[quagga-dev 11347] [PATCH 3/6] zebra: fix rtnh_len in the rt_netlink messages for IPv6 multipath

Feng Lu lu.feng at 6wind.com
Wed Jun 25 09:43:17 BST 2014


The IPv6 gateways were lost because rtnh_len was not increased
along with adding a gateway. Now increase it, each time by 16.

Signed-off-by: Feng Lu <lu.feng at 6wind.com>
Reviewed-by: Alain Ritoux <alain.ritoux at 6wind.com>
---
 zebra/rt_netlink.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index 452ea64..891a91c 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -1564,6 +1564,7 @@ _netlink_route_build_multipath(
     {
       rta_addattr_l (rta, NL_PKT_BUF_SIZE, RTA_GATEWAY,
                      &nexthop->gate.ipv6, bytelen);
+      rtnh->rtnh_len += sizeof (struct rtattr) + 16;
 
       if (IS_ZEBRA_DEBUG_KERNEL)
         zlog_debug("netlink_route_multipath() (%s): "
-- 
1.7.4.4





More information about the Quagga-dev mailing list