]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd, zebra: Add ifindex to NEXTHOP_TYPE_IPV4
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 6 Mar 2017 13:16:43 +0000 (08:16 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 6 Mar 2017 13:40:41 +0000 (08:40 -0500)
When passing up NEXTHOP_TYPE_IPV4 pass up the ifindex as well
Zebra already stores this data by passing it up PIM will be
able to use NEXTHOP_TYPE_IPV4 without having to do a recursive
lookup.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Chirag Shah <chirag@cumulusnetworks.com>
bgpd/bgp_nht.c
zebra/zebra_rnh.c

index e1204f55a127f25503e6b7d577185fd0fc8b6a0e..6bc69f65421916622cd0c9a6ef3386a1fe4620d3 100644 (file)
@@ -432,6 +432,7 @@ bgp_parse_nexthop_update (int command, vrf_id_t vrf_id)
            {
            case NEXTHOP_TYPE_IPV4:
              nexthop->gate.ipv4.s_addr = stream_get_ipv4 (s);
+              nexthop->ifindex = stream_getl (s);
              break;
            case NEXTHOP_TYPE_IFINDEX:
              nexthop->ifindex = stream_getl (s);
index b180930a0a2560f83feab8f5b42094d2c9162452..527125ca53c3951d823e080246b001ac6913d038 100644 (file)
@@ -893,6 +893,7 @@ send_client (struct rnh *rnh, struct zserv *client, rnh_type_t type, vrf_id_t vr
              {
              case NEXTHOP_TYPE_IPV4:
                stream_put_in_addr (s, &nexthop->gate.ipv4);
+                stream_putl (s, nexthop->ifindex);
                break;
              case NEXTHOP_TYPE_IFINDEX:
                stream_putl (s, nexthop->ifindex);