]> git.puffer.fish Git - matthieu/frr.git/commit
Quagga: Fix alignment in netlink messages in some cases
authorvivek <vivek@cumulusnetworks.com>
Fri, 15 Apr 2016 20:32:23 +0000 (13:32 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 23 Sep 2016 13:30:55 +0000 (09:30 -0400)
commit24a7c906dc8a108732188240b117565acbb8fc92
tree4b1d8d24862d8267ca601d75dde4359d57aa238d
parent7758e3f31396019344d495946ba2bdd22e2544e9
Quagga: Fix alignment in netlink messages in some cases

The alignment of nlmsg_len is calculated wrong leading to wrong rta_len
calculations for nested TLVs when the data length of the last TLV added
to the nested TLV is not aligned to RTA_ALIGNTO already. Use same fix
that was implemented in iproute2 by Thomas Graf circa 2005. A reference
to the fix is at
http://oss.sgi.com/archives/netdev/2005-03/msg03103.html.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-6491
Reviewed By: CCR-3087
Testing Done: MPLS testing with other patches in SE-1

Note: Prior to MPLS, we didn't face this problem as we haven't really had
any nested TLVs; even if RTA_MULTIPATH were to be considered a nested TLV,
it didn't have any non-aligned fields.
zebra/rt_netlink.c