diff options
| author | Stephen Worley <sworley@cumulusnetworks.com> | 2019-03-11 10:55:53 -0400 |
|---|---|---|
| committer | Stephen Worley <sworley@cumulusnetworks.com> | 2019-10-25 11:13:37 -0400 |
| commit | 8032b71737520f883abeb1e43476d88cd5a4c304 (patch) | |
| tree | 3358ec95be3409d374868745458956342b92e1bd | |
| parent | 77a44d94f8d75461dc98fa27a94c8802481ab13e (diff) | |
zebra: Update rib_add to take a nexthop ID
Add a parameter to the rib_add function so that it takes
a nexthop ID from the kernel if one is passed along
with the route.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
| -rw-r--r-- | zebra/connected.c | 4 | ||||
| -rw-r--r-- | zebra/kernel_socket.c | 3 | ||||
| -rw-r--r-- | zebra/rib.h | 4 | ||||
| -rw-r--r-- | zebra/rt_netlink.c | 3 | ||||
| -rw-r--r-- | zebra/rtread_getmsg.c | 2 | ||||
| -rw-r--r-- | zebra/zebra_rib.c | 4 |
6 files changed, 11 insertions, 9 deletions
diff --git a/zebra/connected.c b/zebra/connected.c index 87cf8c8f20..b69c5c6e71 100644 --- a/zebra/connected.c +++ b/zebra/connected.c @@ -251,10 +251,10 @@ void connected_up(struct interface *ifp, struct connected *ifc) metric = (ifc->metric < (uint32_t)METRIC_MAX) ? ifc->metric : ifp->metric; rib_add(afi, SAFI_UNICAST, zvrf->vrf->vrf_id, ZEBRA_ROUTE_CONNECT, - 0, 0, &p, NULL, &nh, zvrf->table_id, metric, 0, 0, 0); + 0, 0, &p, NULL, &nh, 0, zvrf->table_id, metric, 0, 0, 0); rib_add(afi, SAFI_MULTICAST, zvrf->vrf->vrf_id, ZEBRA_ROUTE_CONNECT, - 0, 0, &p, NULL, &nh, zvrf->table_id, metric, 0, 0, 0); + 0, 0, &p, NULL, &nh, 0, zvrf->table_id, metric, 0, 0, 0); /* Schedule LSP forwarding entries for processing, if appropriate. */ if (zvrf->vrf->vrf_id == VRF_DEFAULT) { diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c index f5aca2341d..13dd9c8dc1 100644 --- a/zebra/kernel_socket.c +++ b/zebra/kernel_socket.c @@ -1144,7 +1144,8 @@ void rtm_read(struct rt_msghdr *rtm) if (rtm->rtm_type == RTM_GET || rtm->rtm_type == RTM_ADD || rtm->rtm_type == RTM_CHANGE) rib_add(afi, SAFI_UNICAST, VRF_DEFAULT, ZEBRA_ROUTE_KERNEL, 0, - zebra_flags, &p, NULL, &nh, RT_TABLE_MAIN, 0, 0, 0, 0); + zebra_flags, &p, NULL, &nh, 0, RT_TABLE_MAIN, + 0, 0, 0, 0); else rib_delete(afi, SAFI_UNICAST, VRF_DEFAULT, ZEBRA_ROUTE_KERNEL, 0, zebra_flags, &p, NULL, &nh, RT_TABLE_MAIN, diff --git a/zebra/rib.h b/zebra/rib.h index e6d6d87447..6b8097dd13 100644 --- a/zebra/rib.h +++ b/zebra/rib.h @@ -363,8 +363,8 @@ extern void rib_uninstall_kernel(struct route_node *rn, struct route_entry *re); extern int rib_add(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type, unsigned short instance, int flags, struct prefix *p, struct prefix_ipv6 *src_p, const struct nexthop *nh, - uint32_t table_id, uint32_t metric, uint32_t mtu, - uint8_t distance, route_tag_t tag); + uint32_t nhe_id, uint32_t table_id, uint32_t metric, + uint32_t mtu, uint8_t distance, route_tag_t tag); extern int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p, struct prefix_ipv6 *src_p, struct route_entry *re); diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index a030356f38..2744e6da9a 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -618,7 +618,8 @@ static int netlink_route_change_read_unicast(struct nlmsghdr *h, ns_id_t ns_id, gate, afi, nh_vrf_id); } rib_add(afi, SAFI_UNICAST, vrf_id, proto, 0, flags, &p, - &src_p, &nh, table, metric, mtu, distance, tag); + &src_p, &nh, nhe_id, table, metric, mtu, + distance, tag); } else { /* This is a multipath route */ uint8_t nhop_num; diff --git a/zebra/rtread_getmsg.c b/zebra/rtread_getmsg.c index 725bb63a0d..3ba5d6ee73 100644 --- a/zebra/rtread_getmsg.c +++ b/zebra/rtread_getmsg.c @@ -102,7 +102,7 @@ static void handle_route_entry(mib2_ipRouteEntry_t *routeEntry) nh.gate.ipv4.s_addr = routeEntry->ipRouteNextHop; rib_add(AFI_IP, SAFI_UNICAST, VRF_DEFAULT, ZEBRA_ROUTE_KERNEL, 0, - zebra_flags, &prefix, NULL, &nh, 0, 0, 0, 0, 0); + zebra_flags, &prefix, NULL, &nh, 0, 0, 0, 0, 0, 0); } void route_read(struct zebra_ns *zns) diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 1ea11640d7..196d7f1218 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -2947,8 +2947,8 @@ void rib_delete(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type, int rib_add(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type, unsigned short instance, int flags, struct prefix *p, struct prefix_ipv6 *src_p, const struct nexthop *nh, - uint32_t table_id, uint32_t metric, uint32_t mtu, uint8_t distance, - route_tag_t tag) + uint32_t nhe_id, uint32_t table_id, uint32_t metric, uint32_t mtu, + uint8_t distance, route_tag_t tag) { struct route_entry *re; struct nexthop *nexthop; |
