summaryrefslogtreecommitdiffstats
path: root/isys/nl.c
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 /isys/nl.c
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.
Diffstat (limited to 'isys/nl.c')
-rw-r--r--isys/nl.c7
1 files changed, 7 insertions, 0 deletions
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;