summaryrefslogtreecommitdiff
path: root/zebra
diff options
context:
space:
mode:
authorpaul <paul>2003-11-17 10:31:01 +0000
committerpaul <paul>2003-11-17 10:31:01 +0000
commitb84d3a1b6e3e915a0f2e24f13c0445fae8f37a6f (patch)
tree03e1417b2fbe16bb3991fa1fa48bf25d38ea97b6 /zebra
parent42d14d985049a6e810a4036b684e38c005480373 (diff)
2003-11-17 Jay Fenlason <fenlason@redhat.com>
* zebra/rt_netlink.c: netlink_parse_info() ignore messages which are not from kernel. Reported to RH by Herbert Xu. See http://rhn.redhat.com/errata/RHSA-2003-307.html and CAN-2003-0858.
Diffstat (limited to 'zebra')
-rw-r--r--zebra/rt_netlink.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index 02cae6ee..9b13bca4 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -290,6 +290,13 @@ netlink_parse_info (int (*filter) (struct sockaddr_nl *, struct nlmsghdr *),
nl->name, msg.msg_namelen);
return -1;
}
+
+ /* JF: Ignore messages that aren't from the kernel */
+ if ( snl.nl_pid != 0 )
+ {
+ zlog ( NULL, LOG_ERR, "Ignoring message from pid %u", snl.nl_pid );
+ continue;
+ }
for (h = (struct nlmsghdr *) buf; NLMSG_OK (h, status);
h = NLMSG_NEXT (h, status))