]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- DHCPD is now RFC2131 section 4.1 compliant (broadcast to all-ones ip and
authorDavid Hankins <dhankins@isc.org>
Tue, 25 Jul 2006 17:41:18 +0000 (17:41 +0000)
committerDavid Hankins <dhankins@isc.org>
Tue, 25 Jul 2006 17:41:18 +0000 (17:41 +0000)
  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.

README
RELNOTES
common/socket.c

diff --git a/README b/README
index ee857a5b9537e72e2419af55cab0956ad9bb57f3..0f77a44d3b51673a7e6b76ac6844a9c3f8631012 100644 (file)
--- 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
 
index 3f6ac7298b1f98ab52f74c990dfdc20ae1212689..c77b6c278f03db17c36f9c75194a0f86621bebf3 100644 (file)
--- 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
 
index 714321a575ad20e68f362c3934984e561c7f6149..1700612f6ea21c5289271f76861aaea25e1f728d 100644 (file)
@@ -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 */