diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-07-14 07:44:02 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-14 07:44:02 -0400 |
| commit | eef83e96f7141c8b016462195e01b824c600c89e (patch) | |
| tree | 65257a8740e0c130dc60b1149c914c1bc6cca10c /zebra/rt_socket.c | |
| parent | 4e671a08d6bc26f5743b2273389a6b6b29a3850b (diff) | |
| parent | 7414ebd6c416d826860459856f3fb5fd1b11301d (diff) | |
Merge pull request #762 from bingen/mutiple_nh_recursive_levels
Allow for more than 1 NH recursion level
Diffstat (limited to 'zebra/rt_socket.c')
| -rw-r--r-- | zebra/rt_socket.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c index 9859a31627..3ae09945b2 100644 --- a/zebra/rt_socket.c +++ b/zebra/rt_socket.c @@ -80,8 +80,7 @@ kernel_rtm_ipv4 (int cmd, struct prefix *p, struct route_entry *re) struct sockaddr_mpls smpls; #endif union sockunion *smplsp = NULL; - struct nexthop *nexthop, *tnexthop; - int recursing; + struct nexthop *nexthop; int nexthop_num = 0; ifindex_t ifindex = 0; int gate = 0; @@ -106,7 +105,7 @@ kernel_rtm_ipv4 (int cmd, struct prefix *p, struct route_entry *re) #endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ /* Make gateway. */ - for (ALL_NEXTHOPS_RO(re->nexthop, nexthop, tnexthop, recursing)) + for (ALL_NEXTHOPS(re->nexthop, nexthop)) { if (CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_RECURSIVE)) continue; @@ -226,7 +225,7 @@ kernel_rtm_ipv4 (int cmd, struct prefix *p, struct route_entry *re) if (IS_ZEBRA_DEBUG_RIB) zlog_debug ("%s: odd command %s for flags %d", __func__, lookup_msg(rtm_type_str, cmd, NULL), nexthop->flags); - } /* for (ALL_NEXTHOPS_RO(...))*/ + } /* for (ALL_NEXTHOPS(...))*/ /* If there was no useful nexthop, then complain. */ if (nexthop_num == 0 && IS_ZEBRA_DEBUG_KERNEL) @@ -266,8 +265,7 @@ kernel_rtm_ipv6 (int cmd, struct prefix *p, struct route_entry *re) { struct sockaddr_in6 *mask; struct sockaddr_in6 sin_dest, sin_mask, sin_gate; - struct nexthop *nexthop, *tnexthop; - int recursing; + struct nexthop *nexthop; int nexthop_num = 0; ifindex_t ifindex = 0; int gate = 0; @@ -289,7 +287,7 @@ kernel_rtm_ipv6 (int cmd, struct prefix *p, struct route_entry *re) #endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ /* Make gateway. */ - for (ALL_NEXTHOPS_RO(re->nexthop, nexthop, tnexthop, recursing)) + for (ALL_NEXTHOPS(re->nexthop, nexthop)) { if (CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_RECURSIVE)) continue; |
