mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-11 05:42:23 +00:00
zebra: Increase recvmsg buffer size for picking up netlink messages
Netlink messages from the kernel need to be received in a buffer larger than 8K in order to handle some types of info - for example, the VLAN information. Define a separate size for receive and set it to 32K, which is the value used by other netlink receivers like iproute2. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
8cb73ba40d
commit
9ed7517b1a
@ -463,7 +463,7 @@ int netlink_parse_info(int (*filter)(struct sockaddr_nl *, struct nlmsghdr *,
|
|||||||
int read_in = 0;
|
int read_in = 0;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
char buf[NL_PKT_BUF_SIZE];
|
char buf[NL_RCV_PKT_BUF_SIZE];
|
||||||
struct iovec iov = {.iov_base = buf, .iov_len = sizeof buf};
|
struct iovec iov = {.iov_base = buf, .iov_len = sizeof buf};
|
||||||
struct sockaddr_nl snl;
|
struct sockaddr_nl snl;
|
||||||
struct msghdr msg = {.msg_name = (void *)&snl,
|
struct msghdr msg = {.msg_name = (void *)&snl,
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#ifdef HAVE_NETLINK
|
#ifdef HAVE_NETLINK
|
||||||
|
|
||||||
|
#define NL_RCV_PKT_BUF_SIZE 32768
|
||||||
#define NL_PKT_BUF_SIZE 8192
|
#define NL_PKT_BUF_SIZE 8192
|
||||||
|
|
||||||
extern void netlink_parse_rtattr(struct rtattr **tb, int max,
|
extern void netlink_parse_rtattr(struct rtattr **tb, int max,
|
||||||
|
Loading…
Reference in New Issue
Block a user