From: David Hankins Date: Tue, 25 Jul 2006 17:41:18 +0000 (+0000) Subject: - DHCPD is now RFC2131 section 4.1 compliant (broadcast to all-ones ip and X-Git-Tag: v3_1_0a1~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41e45067768027eac49a5e5057d2ecadf53a15b8;p=thirdparty%2Fdhcp.git - DHCPD is now RFC2131 section 4.1 compliant (broadcast to all-ones ip and ethernet mac address) on the SCO platform specifically without any strange ifconfig hacks. Many thanks go to the Kroger Co. for donating the hardware and funding the development. [V3-0-1-KROGER-WORK-BRANCH] - funded development. --- diff --git a/README b/README index ee857a5b9..0f77a44d3 100644 --- a/README +++ b/README @@ -339,11 +339,14 @@ more information, consult the vconfig man pages. SCO -SCO has the same problem as Linux (described earlier). The thing is, -SCO *really* doesn't want to let you add a host route to the all-ones -broadcast address. +ISC DHCP will now work correctly on newer versions of SCO out of the +box (tested on OpenServer 5.05b, assumed to work on UnixWare 7). -On more recent versions of SCO, you can do this: +Older versions of SCO have the same problem as linux (described earlier). +The thing is, SCO *really* doesn't want to let you add a host route to +the all-ones broadcast address. + +You can try the following: ifconfig net0 xxx.xxx.xxx.xxx netmask 0xNNNNNNNN broadcast 255.255.255.255 @@ -354,9 +357,7 @@ If this doesn't work, you can also try the following strange hack: Apparently this works because of an interaction between SCO's support for network classes and the weird netmask. The 10.* network is just a dummy that can generally be assumed to be safe. Don't ask why this -works. Just try it. If it works for you, great. SCO has added -support for doing DHCP in a more sensible way, and it will appear in -a future feature release. +works. Just try it. If it works for you, great. HP-UX diff --git a/RELNOTES b/RELNOTES index 3f6ac7298..c77b6c278 100644 --- a/RELNOTES +++ b/RELNOTES @@ -146,11 +146,15 @@ and for prodding me into improving it. - Support for compressed 'domain name list' style DHCP option contents, and in particular the domain search option (#119) was added. -- The DHCP LEASEQUERY protocol as definied in RFC4388 is now implemented. +- The DHCP LEASEQUERY protocol as defined in RFC4388 is now implemented. LEASEQUERY lets you query the DHCP server for information about a lease, using either an IP address, MAC address, or client identifier. Thanks to a patch from Justin Haddad. +- DHCPD is now RFC2131 section 4.1 compliant (broadcast to all-ones ip and + ethernet mac address) on the SCO platform specifically without any strange + ifconfig hacks. Many thanks go to the Kroger Co. for donating the + hardware and funding the development. Changes since 3.0.4 diff --git a/common/socket.c b/common/socket.c index 714321a57..1700612f6 100644 --- a/common/socket.c +++ b/common/socket.c @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: socket.c,v 1.58 2005/03/17 20:15:00 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n"; +"$Id: socket.c,v 1.59 2006/07/25 17:41:18 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -149,6 +149,20 @@ int if_register_socket (info) } #endif + /* IP_BROADCAST_IF instructs the kernel which interface to send + * IP packets whose destination address is 255.255.255.255. These + * will be treated as subnet broadcasts on the interface identified + * by ip address (info -> primary_address). This is only known to + * be defined in SCO system headers, and may not be defined in all + * releases. + */ +#if defined(SCO) && defined(IP_BROADCAST_IF) + if (setsockopt (sock, IPPROTO_IP, IP_BROADCAST_IF, + &info -> primary_address, + sizeof (info -> primary_address)) < 0) + log_fatal ("Can't set IP_BROADCAST_IF on dhcp socket: %m"); +#endif + return sock; } #endif /* USE_SOCKET_SEND || USE_SOCKET_RECEIVE || USE_SOCKET_FALLBACK */