Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jun 2011 10:29:17 -0700
From:      Garrett Cooper <yanegomi@gmail.com>
To:        FreeBSD Current <freebsd-current@freebsd.org>
Cc:        "Bjoern A. Zeeb" <bz@freebsd.org>
Subject:   IPv4 broken on r222048
Message-ID:  <BANLkTinWSP0ko69qi9Qca7O2=LRpSn19yw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTinWSP0ko69qi9Qca7O2=LRpSn19yw>