zebra: Make the --nl-bufsize arg set the input parse buffer too
* See bug #887. Existing statically sized NL_PKT_BUF_SIZE input parse buffer
in netlink_parse_info may not be enough. As an initial hacky fix, at least
give admins a runtime way to change this buffer, with the existing
--nl-bufsize argument to zebra.
* rt_netlink.c: (nl_rcvbuf) static input buffer and length.
(netlink_parse_info) replace the local fixed size buffer with nl_rcvbuf.
Improve warning on MSG_TRUNC to advise admin on what to do.
(kernel_init) Dynamically allocate nl_rcvbuf input parse buffer to
at least 2 pages, or nl_rcvbufsize argument, whichever is greater.
Based on the debugging and investigation of:
Konstantin <tempest921@gmail.com>
diff --git a/lib/memtypes.c b/lib/memtypes.c
index f9eae93..e5b3546 100644
--- a/lib/memtypes.c
+++ b/lib/memtypes.c
@@ -87,6 +87,7 @@
{ MTYPE_RIB_DEST, "RIB destination" },
{ MTYPE_RIB_TABLE_INFO, "RIB table info" },
{ MTYPE_NETLINK_NAME, "Netlink name" },
+ { MTYPE_NETLINK_RCVBUF, "Netlink receive buffer" },
{ MTYPE_RNH, "Nexthop tracking object" },
{ -1, NULL },
};