summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2006-05-24 23:55:44 +0000
committerDavid Cantrell <dcantrell@redhat.com>2006-05-24 23:55:44 +0000
commitcb1d032be5d2ab13a14add12a525b12cce36f50e (patch)
treee16bba3cfd42b22423d343d5e9a1969af69549ef
parent31f35c885de180215e7a380e5479b4494430399a (diff)
downloadanaconda-cb1d032be5d2ab13a14add12a525b12cce36f50e.tar.gz
anaconda-cb1d032be5d2ab13a14add12a525b12cce36f50e.tar.xz
anaconda-cb1d032be5d2ab13a14add12a525b12cce36f50e.zip
* isys/nl.c: Skip Netlink messages with void ARP headers or zero-length
ARP headers.
-rw-r--r--ChangeLog5
-rw-r--r--isys/nl.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 33c97de60..781063507 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-24 David Cantrell <dcantrell@redhat.com>
+
+ * isys/nl.c: Skip Netlink messages with void ARP headers or zero-length
+ ARP headers.
+
2006-05-24 Jeremy Katz <katzj@redhat.com>
* scripts/upd-instroot (PACKAGESGR): Add new pygobject package
diff --git a/isys/nl.c b/isys/nl.c
index 00ced2cef..a1de1f291 100644
--- a/isys/nl.c
+++ b/isys/nl.c
@@ -24,6 +24,7 @@
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
#include <arpa/inet.h>
+#include <net/if_arp.h>
#include <glib.h>
@@ -283,6 +284,12 @@ int netlink_init_interfaces_list(void) {
rta = IFLA_RTA(ifi);
len = IFLA_PAYLOAD(nlh);
+ /* void and none are bad */
+ if (ifi->ifi_type == ARPHRD_VOID || ifi->ifi_type == ARPHRD_NONE) {
+ nlh = NLMSG_NEXT(nlh, ret);
+ continue;
+ }
+
while (RTA_OK(rta, len)) {
if (rta->rta_type <= len)
tb[rta->rta_type] = rta;