IPv4 broken on r222048

Garrett Cooper yanegomi at gmail.com
Tue Jun 7 17:29:18 UTC 2011


Hi,
    I'm running into an issue where ifconfig isn't executing properly,
and is emitting the following message:

# ifconfig re0 inet w.x.y.z
ifconfig: can't set link-level netmask or broadcast
#

    This unfortunately also breaks 'dhclient re0' (in my case) as it
calls ifconfig.
    Inserting some printfs in link_getaddr it looks like it's trying
to test something incorrectly:

# ifconfig re0 inet 192.168.20.3
which: 1, ADDR: 1
which: 3, ADDR: 1
ifconfig: can't set link-level netmask or broadcast
#

    Attaching gdb to the process (because the link_getaddr functions
are function pointers and I wanted to remove all obscurity), the
failing call is originating from setifdstaddr. The abbreviated stack
trace is:

- af_link.c:77
- ifconfig.c:773
- ifconfig.c:579
- ifconfig.c:346

    The actual line count in af_link.c is going to be fuzzed by 2
because of the printf I added.
    I haven't traced down what commit exactly is causing this, but the
issue appears to be a purely userland based problem so far (I
accidentally forgot to swap kernels before booting up the second time
and the symptoms are exactly the same).
    I have both INET and INET6 built into my kernel and userland, but
my immediate upstream router only supports IPv4 right now. I tried
building with WITHOUT_INET6=yes to see if it made a difference, and it
didn't.
    I'll test any patches needed to remedy the issue. Thankfully I
have flash media I can use in the meantime to push code between my two
boxes :).
Thanks,
-Garrett


More information about the freebsd-current mailing list