[zebra/linux] Use BPF to filter out responses, to try avoid netlink overruns
2008-05-29 Stephen Hemminger <stephen.hemminger@vyatta.com>
* rt_netlink.c: (netlink_install_filter) BPF filter to catch and
drop responses to zebra's own route messages.
(kernel_init) add BPF filter on the netlink socket.
diff --git a/lib/zebra.h b/lib/zebra.h
index 150aa2c..2716460 100644
--- a/lib/zebra.h
+++ b/lib/zebra.h
@@ -162,6 +162,8 @@
#ifdef HAVE_NETLINK
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
+#include <linux/filter.h>
+#include <stddef.h>
#else
#define RT_TABLE_MAIN 0
#endif /* HAVE_NETLINK */