]> git.puffer.fish Git - mirror/frr.git/commit
zebra: Format netlink requests correctly
authorvivek <vivek@cumulusnetworks.com>
Mon, 15 May 2017 05:28:32 +0000 (22:28 -0700)
committervivek <vivek@cumulusnetworks.com>
Thu, 25 May 2017 17:20:03 +0000 (10:20 -0700)
commit289602d73d192ba31977fda834a52454b9bbb5ab
treef6ddde5669668c0f6ca572cc51a24e91829e00aa
parent80e7e4077d53ab63f6c4790b560c93181a25d192
zebra: Format netlink requests correctly

When zebra issues read (GET) requests to the kernel using the netlink
interface, it is incorrect to format all of them in a generic manner
using 'struct ifinfomsg' or 'struct rtgenmsg'. Rather, messages for a
particular entity (e.g., routes) should use the corresponding structure
for encoding (e.g., 'struct rtmsg'). Of course, this has to correlate
with what the kernel expects.

In the absence of this, there is the possibility of sending extraneous
information in the request which the kernel wouldn't like.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: David Ahern <dsa@cumulusnetworks.com>
zebra/if_netlink.c
zebra/kernel_netlink.c
zebra/kernel_netlink.h
zebra/rt_netlink.c