SHA256
1
0
forked from pool/dhcp
dhcp/0027-dhcp-4.2.x-handle-ifa_addr-NULL.909189.patch
Marius Tomaschewski 68ca1863f7 - Applied fix by Jiri Slaby to not crash in interface discovery
when the interface address is NULL, which has been introduced
  by the infiniband support patch (bsc#909189,bsc#870535).
  [+ 0027-dhcp-4.2.x-handle-ifa_addr-NULL.909189.patch]
- Reverted previous commit

OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=143
2014-12-10 13:24:44 +00:00

29 lines
726 B
Diff

From 17e0eabe7700d02b48ed8b0a923427caad3b7b4b Mon Sep 17 00:00:00 2001
From: Jiri Slaby <jslaby@suse.cz>
Date: Wed, 10 Dec 2014 13:48:03 +0100
Subject: [PATCH] dhcp-4.2.x-handle-ifa_addr-NULL.909189
References: bsc#909189,bnc#870535
Fix to not crash in interface discovery when the interface
address is NULL. Bug has been introduced by the infiniband
support patch (bsc#870535).
diff --git a/common/lpf.c b/common/lpf.c
index 9dc6053..892ccce 100644
--- a/common/lpf.c
+++ b/common/lpf.c
@@ -605,6 +605,9 @@ get_hw_addr(struct interface_info *info)
for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) {
+ if (!ifa->ifa_addr)
+ continue;
+
if (ifa->ifa_addr->sa_family != AF_PACKET)
continue;
--
2.2.0