From dd484ced0d8dc703a864008c3daafaeca6587d72 Mon Sep 17 00:00:00 2001 From: David Hankins Date: Wed, 20 Aug 2008 23:07:19 +0000 Subject: [PATCH] - Compliation warnings on GCC 4.3 relating to bootp source address selection were repaired. [ISC-Bugs #18520] --- RELNOTES | 3 +++ server/bootp.c | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/RELNOTES b/RELNOTES index 6223570b..6eb4e0c0 100644 --- 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. diff --git a/server/bootp.c b/server/bootp.c index aff4a33a..f3ec1302 100644 --- a/server/bootp.c +++ b/server/bootp.c @@ -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);