summaryrefslogtreecommitdiff
path: root/zebra/kernel_netlink.c
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2018-07-29 07:58:01 -0400
committerGitHub <noreply@github.com>2018-07-29 07:58:01 -0400
commitddd4a7a4cc041447ff7f2e726c865b07123391eb (patch)
tree442a8c34d2d236e4ee1b8909f4f3407e3086c557 /zebra/kernel_netlink.c
parent3688ecb8d91fe8faac91ebe93b73d14462160b6e (diff)
parente6a0e0d1413a2cfb17be8374d82a1db555fd5ec2 (diff)
Merge pull request #2735 from sworleys/Netlink-Next-Fault
zebra: Check for netlink message next fault
Diffstat (limited to 'zebra/kernel_netlink.c')
-rw-r--r--zebra/kernel_netlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c
index 8703b01319..cd881dcc24 100644
--- a/zebra/kernel_netlink.c
+++ b/zebra/kernel_netlink.c
@@ -638,7 +638,7 @@ int netlink_parse_info(int (*filter)(struct nlmsghdr *, ns_id_t, int),
read_in++;
for (h = (struct nlmsghdr *)buf;
- NLMSG_OK(h, (unsigned int)status);
+ (status >= 0 && NLMSG_OK(h, (unsigned int)status));
h = NLMSG_NEXT(h, status)) {
/* Finish of reading. */
if (h->nlmsg_type == NLMSG_DONE)