Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Trying to add inet6 address w/o inet6 support resets interface configuration



David Young wrote:
On Mon, May 19, 2008 at 11:15:59AM -0700, Scott Ellis wrote:
On Mon, May 19, 2008 11:04 am, David Young wrote:
On Mon, May 19, 2008 at 09:33:01AM -0700, Scott Ellis wrote:
On Mon, May 19, 2008 9:29 am, David Young wrote:
On Sat, May 17, 2008 at 12:44:15PM -0700, Scott Ellis wrote:
I noticed this on the May 5th kernel+userland, and just now got a
chance
to try it on today's kernel+userland.

I always build my systems w/o INET6 (no need for it yet).
Unfortunately, after boot, lo0 isn't configured.  Turns out running
"ifconfig lo0 inet6" (as is done twice in rc.d/network) results in a
SIOCAIFADDR error, that removes the configuration entirely. :-(

For example...

intrepid{~}# ifconfig lo0
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33648
        inet 127.0.0.1 netmask 0xff000000
intrepid{~}# ifconfig lo0 inet6
lo0: SIOCAIFADDR: Address family not supported by protocol family
On intrepid, what domain name does 'inet6' resolve to?
That's a weird question. :-) I'm using OpenDNS, so I get:

intrepid{~}% nslookup inet6
Server:         127.0.0.1
Address:        127.0.0.1#53

Non-authoritative answer:
Name:   inet6.warped.com
Address: 208.67.219.132

Is that what you wanted to know?
Yes.  I have just committed a fix for a related bug, but it looks to
me like ifconfig may be working correctly in this case.  How do you
build your userland?  Do you use any MKxxxx or USExxxx options, such as
MKINET6=no or USE_INET6=no?
Yeah, MKINET6=no and no inet6 in the kernel (hence the SIOCAIFADDR from
ifconfig).  The full list of MK* for my build is:

Ok.  Please try the latest ifconfig.

I think that one always runs the risk of replacing the first IPv4 address
on lo0, with either the old ifconfig or the new, by running 'ifconfig
lo0 inet6' on a MKINET6=no userland.

With a -current ifconfig (but the same May 17th kernel) doing "ifconfig lo0 inet6" works (and /etc/rc.d/network works as expected). All is not perfect though:

intrepid{~}% ifconfig lo0
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33648
        inet 127.0.0.1 netmask 0xff000000
ifconfig: link_status: getsock: Protocol wrong type for socket
intrepid{~}%

The link_status error is new, although I'm not sure if it's related to the older kernel or not (I can't reboot the box just yet).

With regards to "ifconfig lo0 inet6" always being a risky proposition, I agree. Unfortunately it's what rc.d/network does. :-)

Thanks for the fix, and for the whole modular-ifconfig stuff!

        ScottE





Home | Main Index | Thread Index | Old Index