Re: in6_unlink_ifa: interface address has no prefix

2013-06-12 Thread Martin Pieuchot
On 10/06/13(Mon) 02:05, Alexander Bluhm wrote:
 On Sun, Jun 09, 2013 at 06:34:27PM +0200, Christopher Zimmermann wrote:
  inet 172.26.153.50 0xff00 NONE mtu 1398
  
  in6_unlink_ifa: interface address 0x80624a00 has no prefix
  in6_unlink_ifa: interface address 0x80624a00 has no prefix
 
 The error message is triggered by ifconfig lo1 create up.  With
 address instead of pointer logging and sysctl net.inet6.icmp6.nd6_debug=1
 you see the source of the problem.
 
 in6_unlink_ifa: interface address ::0001 has no prefix
 in6_ifattach_loopback: failed to configure the loopback address on lo1 
 (errno=17)
 
 It is a different issue that creating lo1 tries to add a ::1 address.
 But when this fails, it is correct that it has no prefix.  So don't
 log an error here.

I'm not sure to understand here, you're saying that is it correct that
lo1 has no prefix because it is a loopback interface or because, in
this case adding an IPv6 address failed?

Martin



Re: in6_unlink_ifa: interface address has no prefix

2013-06-12 Thread Stuart Henderson
On 2013/06/12 12:51, Martin Pieuchot wrote:
 On 10/06/13(Mon) 02:05, Alexander Bluhm wrote:
  On Sun, Jun 09, 2013 at 06:34:27PM +0200, Christopher Zimmermann wrote:
   inet 172.26.153.50 0xff00 NONE mtu 1398
   
   in6_unlink_ifa: interface address 0x80624a00 has no prefix
   in6_unlink_ifa: interface address 0x80624a00 has no prefix
  
  The error message is triggered by ifconfig lo1 create up.  With
  address instead of pointer logging and sysctl net.inet6.icmp6.nd6_debug=1
  you see the source of the problem.
  
  in6_unlink_ifa: interface address ::0001 has no prefix
  in6_ifattach_loopback: failed to configure the loopback address on lo1 
  (errno=17)
  
  It is a different issue that creating lo1 tries to add a ::1 address.
  But when this fails, it is correct that it has no prefix.  So don't
  log an error here.

Diff is OK sthen.

 I'm not sure to understand here, you're saying that is it correct that
 lo1 has no prefix because it is a loopback interface or because, in
 this case adding an IPv6 address failed?
 
 Martin
 

Both..

1. it is correct that it has no prefix because it's a loopback address, and

2. in6_unlink_ifa is called on the loopback address, which then complains
about the adress.

but also:

3. the reason for in6_unlink_ifa being called at all is because
in6_ifattach_loopback automatically tries to add in6addr_loopback to a
newly created lo interface, which is the wrong thing to do in the case
of multiple lo(4) interfaces.

In the v4 case, 127.0.0.1 is set on the interface explicitly by /etc/netstart;
v6 should probably do the same.




Re: in6_unlink_ifa: interface address has no prefix

2013-06-12 Thread Martin Pieuchot
On 12/06/13(Wed) 12:19, Stuart Henderson wrote:
 On 2013/06/12 12:51, Martin Pieuchot wrote:
  On 10/06/13(Mon) 02:05, Alexander Bluhm wrote:
   On Sun, Jun 09, 2013 at 06:34:27PM +0200, Christopher Zimmermann wrote:
inet 172.26.153.50 0xff00 NONE mtu 1398

in6_unlink_ifa: interface address 0x80624a00 has no prefix
in6_unlink_ifa: interface address 0x80624a00 has no prefix
   
   The error message is triggered by ifconfig lo1 create up.  With
   address instead of pointer logging and sysctl net.inet6.icmp6.nd6_debug=1
   you see the source of the problem.
   
   in6_unlink_ifa: interface address ::0001 has no prefix
   in6_ifattach_loopback: failed to configure the loopback address on lo1 
   (errno=17)
   
   It is a different issue that creating lo1 tries to add a ::1 address.
   But when this fails, it is correct that it has no prefix.  So don't
   log an error here.
 
 Diff is OK sthen.
 
  I'm not sure to understand here, you're saying that is it correct that
  lo1 has no prefix because it is a loopback interface or because, in
  this case adding an IPv6 address failed?
  
  Martin
  
 
 Both..
 
 1. it is correct that it has no prefix because it's a loopback address, and

Thanks for the explanation, I'm ok with the diff then. 

 2. in6_unlink_ifa is called on the loopback address, which then complains
 about the adress.
 
 but also:
 
 3. the reason for in6_unlink_ifa being called at all is because
 in6_ifattach_loopback automatically tries to add in6addr_loopback to a
 newly created lo interface, which is the wrong thing to do in the case
 of multiple lo(4) interfaces.
 
 In the v4 case, 127.0.0.1 is set on the interface explicitly by /etc/netstart;
 v6 should probably do the same.
 
 



want to subscribe tech@openbsd.org

2013-06-12 Thread Михаил Швецов

want to subscribe tech@openbsd.org

Михаил Швецов.


bge: fixup the random tx backoff seed mask

2013-06-12 Thread Mike Belopuhov
NetBSD and Broadcom docs (5718-PG106-R.pdf and 57XX-PG105-R.pdf)
and even our bnx(4) driver (and it's spec) agree that the mask
should be 0x3ff.

OK?

diff --git sys/dev/pci/if_bgereg.h sys/dev/pci/if_bgereg.h
index 3685f14..c0a28b9 100644
--- sys/dev/pci/if_bgereg.h
+++ sys/dev/pci/if_bgereg.h
@@ -720,11 +720,11 @@
 #defineBGE_LEDCTL_TRADLED_STS  0x0400
 #defineBGE_LEDCTL_BLINKPERIOD  0x7FF8
 #defineBGE_LEDCTL_BLINKPERIOD_OVERRIDE 0x8000
 
 /* TX backoff seed register */
-#defineBGE_TX_BACKOFF_SEED_MASK0x3F
+#defineBGE_TX_BACKOFF_SEED_MASK0x3FF
 
 /* Autopoll status register */
 #defineBGE_AUTOPOLLSTS_ERROR   0x0001
 
 /* Transmit MAC mode register */



Re: in6_unlink_ifa: interface address has no prefix

2013-06-12 Thread Alexander Bluhm
On Wed, Jun 12, 2013 at 12:19:30PM +0100, Stuart Henderson wrote:
 3. the reason for in6_unlink_ifa being called at all is because
 in6_ifattach_loopback automatically tries to add in6addr_loopback to a
 newly created lo interface, which is the wrong thing to do in the case
 of multiple lo(4) interfaces.
 
 In the v4 case, 127.0.0.1 is set on the interface explicitly by /etc/netstart;
 v6 should probably do the same.

I don't think so.  Many things that are handled by userland in IPv4
are done by the kernel in IPv6.  These are autoconfiguration, and
link-local addresses, and the ::1 address.  Like it or not, this
is part of the idea.

There are just bugs and unimplemented cases in our stack.  Look at
these comments in netinet6/in6_ifattach.c .

 * XXX multiple loopback interface needs more care.  for instance,
 * nodelocal address needs to be configured onto only one of them.
 * XXX multiple link-local address case

 * assign loopback address for loopback interface.
 * XXX multiple loopback interface case.

bluhm