Interface Discover issue in ISC DHCP 4.1.0

Yong Bo Hu huyongbo at cn.ibm.com
Thu Dec 31 04:05:48 UTC 2009



Not sure whether it's fine to send this there.

The scenario:
Interface ETH0, has and only has IPv4:192.168.1.2 and IPv6 aaaa::cccc.  Now
the IPv4 address is down, and the IPv6 address is up.  And ranges of
192.168.1.0 and aaaa::/64  are configured.  Next start the DHCP server with
IPv6(-6), the result is the ETH0 is skipped with no message in the log
about this interface.     If the IPv4 is up, the ETH0 can be listened.

After debug, I locate the code in discover.c:.

        /* Skip non broadcast interfaces (plus loopback and
           point-to-point in case an OS incorrectly marks them
           as broadcast). Also skip down interfaces unless we're:
           trying to get a list of configurable interfaces. */
        if (((!(info.flags & IFF_BROADCAST) ||
              info.flags & IFF_LOOPBACK ||)
              info.flags & IFF_POINTOPOINT) && !tmp) ||
            (!(info.flags & IFF_UP) &&
             state != DISCOVER_UNCONFIGURED))
            continue;

On the surface, the interface can be listened depending on the state of
IPv4 address when starting IPv6 DHCP, but it shouldn't.  The key point here
is the IFF_BROADCAST flag, for ordinary IPv4 address, it's broadcast
address valid, but for IPv6, which has not broadcast, but has multicast
(IFF_MULTICAST), so i think it would need to differentiate the IPv4 and
IPv6 when to check which interface needs to skip.

Best&Regards
Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-workers/attachments/20091231/9a5472b8/attachment.html>


More information about the dhcp-workers mailing list