]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: add support for NEXTHOP_TYPE_IPV6_IFINDEX in zserv
authorRenato Westphal <renato@opensourcerouting.org>
Sat, 19 Aug 2017 16:01:00 +0000 (13:01 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Wed, 23 Aug 2017 20:45:17 +0000 (17:45 -0300)
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 <renato@opensourcerouting.org>
zebra/zserv.c

index aa7189fe898999176e285e3c6e33dc1cffe1ecac..b2ee9c0b476271ad3ac546cb7e29e810e780d0dc 100644 (file)
@@ -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);