Skip to content

Commit 2f71996

Browse files
committed
zebra: Note when the netlink DUMP command is interrupted
There exists code paths in the linux kernel where a dump command will be interrupted( I am not sure I understand what this really means ) and the data sent back from the kernel is wrong or incomplete. At this point in time I am not 100% certain what should be done, but let's start noticing that this has happened so we can formulate a plan or allow the end operator to know bad stuff is a foot at the circle K. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
1 parent 5bc17d7 commit 2f71996

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

zebra/kernel_netlink.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,6 +1016,18 @@ int netlink_parse_info(int (*filter)(struct nlmsghdr *, ns_id_t, int),
10161016
return err;
10171017
}
10181018

1019+
/*
1020+
* What is the right thing to do? The kernel
1021+
* is telling us that the dump request was interrupted
1022+
* and we more than likely are out of luck and have
1023+
* missed data from the kernel. At this point in time
1024+
* lets just note that this is happening.
1025+
*/
1026+
if (h->nlmsg_flags & NLM_F_DUMP_INTR)
1027+
flog_err(
1028+
EC_ZEBRA_NETLINK_BAD_SEQUENCE,
1029+
"netlink recvmsg: The Dump request was interrupted");
1030+
10191031
/* OK we got netlink message. */
10201032
if (IS_ZEBRA_DEBUG_KERNEL)
10211033
zlog_debug(

0 commit comments

Comments
 (0)