[quagga-dev 10012] Set macro NL_PKT_BUF_SIZE to 8192
gpstrive at gmail.com
Wed Nov 21 12:58:24 GMT 2012
Recently, I have met a trouble that next hop of the update message sent
from bgpd is ::(all zero) which should be 2001::64/64 . At last , I found
the reason that buf or buf[NL_PKT_BUF_SIZE] in function
netlink_parse_info(zebra/rt_netlink.c) was overflow.This
result in zebra can't get the complete interfaces and addresses of the
I looked into the linux kernel v3.6 and discovered the following
214 * skb should fit one page. This choice is good for headerless malloc.
215 * But we should limit to 8K so that userspace does not have to
216 * use enormous buffer sizes on recvmsg() calls just to avoid
217 * MSG_TRUNC when PAGE_SIZE is very large.
219 #if PAGE_SIZE < 8192UL
220 #define NLMSG_GOODSIZE SKB_WITH_OVERHEAD(PAGE_SIZE)
222 #define NLMSG_GOODSIZE SKB_WITH_OVERHEAD(8192UL)
PAGE_SIZE on my platform is 64KB, in addtion I had added so many virtual
I changed buf to buf, everything is normal.
So maybe we should be consistent with linux kernel.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Quagga-dev