From f38efb809d91605b3b29cf9eb226825d28f680af Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Sat, 19 Aug 2017 13:01:00 -0300 Subject: [PATCH] zebra: add support for NEXTHOP_TYPE_IPV6_IFINDEX in zserv This is the v6 counterpart of commit c963c20. Fixes a bug where ipv6 routes received from babeld were being ignored. Signed-off-by: Renato Westphal --- zebra/zserv.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zebra/zserv.c b/zebra/zserv.c index aa7189fe89..b2ee9c0b47 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -1534,6 +1534,7 @@ static int zread_ipv6_add(struct zserv *client, u_short length, unsigned int i; struct stream *s; struct in6_addr nhop_addr; + ifindex_t ifindex; struct route_entry *re; u_char message; u_char nexthop_num; @@ -1609,6 +1610,12 @@ static int zread_ipv6_add(struct zserv *client, u_short length, nexthops[nh_count++] = nhop_addr; } break; + case NEXTHOP_TYPE_IPV6_IFINDEX: + stream_get(&nhop_addr, s, 16); + ifindex = stream_getl(s); + route_entry_nexthop_ipv6_ifindex_add( + re, &nhop_addr, ifindex); + break; case NEXTHOP_TYPE_IFINDEX: if (if_count < multipath_num) { ifindices[if_count++] = stream_getl(s); -- 2.39.5