SHA256
1
0
forked from pool/dhcp
dhcp/dhcp-4.1.1-P1-relay-no-ip-on-interface.diff
Marius Tomaschewski 1071b12d06 - Fixed a dhcrelay segfault while receiving packets on interfaces
without any IPv4 address assigned (bnc#631305, reported upsteam
  as [ISC-Bugs #22409]).
- Fixed a common infinite loop while parsing options with optional
  parts in the value such as in slp-service-scope option (bnc#643845,
  reported upsteam as [ISC-Bugs #22410]).
- Fixed init scripts to report correct LSB codes in status action,
  when the config file or the binary do not exists (bnc#640336).
- Fixed syntax of a check in the rcdhcrelay[6] (bnc#648580)
- Avoid pid check error message in the rcdhcpd[6] (bnc#646875)

OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=38
2010-11-02 10:29:02 +00:00

32 lines
981 B
Diff

From 4509d956715297469469ab0e207c2641f521470d Mon Sep 17 00:00:00 2001
From: Marius Tomaschewski <mt@suse.de>
Date: Fri, 29 Oct 2010 18:49:06 +0200
Subject: [PATCH] dhcp-4.1.1-P1-relay-no-ip-on-interface
Fix for a dhcrelay segfault while receiving packets on interfaces
without any IPv4 address assigned (bnc#631305, [ISC-Bugs #22409]).
Signed-off-by: Marius Tomaschewski <mt@suse.de>
---
relay/dhcrelay.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c
index 11676ae..c375c83 100644
--- a/relay/dhcrelay.c
+++ b/relay/dhcrelay.c
@@ -565,6 +565,10 @@ do_relay4(struct interface_info *ip, struct dhcp_packet *packet,
log_info("Discarding packet with invalid hlen.");
return;
}
+ if (ip->address_count < 1 || ip->addresses == NULL) {
+ log_info("Discarding packet from interface without IP address");
+ return;
+ }
/* Find the interface that corresponds to the giaddr
in the packet. */
--
1.7.1