]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- Compliation warnings on GCC 4.3 relating to bootp source address
authorDavid Hankins <dhankins@isc.org>
Wed, 20 Aug 2008 23:07:19 +0000 (23:07 +0000)
committerDavid Hankins <dhankins@isc.org>
Wed, 20 Aug 2008 23:07:19 +0000 (23:07 +0000)
  selection were repaired.  [ISC-Bugs #18520]

RELNOTES
server/bootp.c

index 6223570b0a4a5b9a8fd1563cde4cd472ab30e39f..6eb4e0c051f4c8e154b525bf4408ed39b523b907 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -133,6 +133,9 @@ work on other platforms. Please report any problems and suggested fixes to
 - A warning was added since the DHCPv6 processing software does not yet
   support class statements.
 
+- Compliation warnings on GCC 4.3 relating to bootp source address
+  selection were repaired.
+
                        Changes since 4.0.0 (new features)
 
 - Added DHCPv6 rapid commit support.
index aff4a33aee6943020f7f1f7abf0af47a1685acac..f3ec1302691198d2e9690b5ae551326aeed84721 100644 (file)
@@ -351,8 +351,14 @@ void bootp (packet)
        hto.hlen = packet -> raw -> hlen + 1;
        memcpy (&hto.hbuf [1], packet -> raw -> chaddr, packet -> raw -> hlen);
 
-       if (packet->interface->address_count)
+       if (packet->interface->address_count) {
                from = packet->interface->addresses[0];
+       } else {
+               log_error("%s: Interface %s appears to have no IPv4 "
+                         "addresses, and so dhcpd cannot select a source "
+                         "address.", msgbuf, packet->interface->name);
+               goto out;
+       }
 
        /* Report what we're doing... */
        log_info ("%s", msgbuf);