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

David Lamparter equinox at opensourcerouting.org
Wed Jun 25 17:31:13 BST 2014


On Wed, Jun 25, 2014 at 09:02:53AM -0700, Stephen Hemminger wrote:
> On Wed, 25 Jun 2014 16:43:17 +0800
> Feng Lu <lu.feng at 6wind.com> wrote:
> 
> > 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): "
> 
> Rather 16, it should be bytelen.
> 
> This code needs to be made more generic, right now lots of copy/paste
> of identical for the two cases of IPv4 and IPv6.

Err... wasn't the ECMP netlink API completely different between IPv4 and
IPv6?  Was this changed in-kernel?


-David




More information about the Quagga-dev mailing list