diff options
| author | ßingen <bingen@voltanet.io> | 2017-06-27 12:49:49 +0200 |
|---|---|---|
| committer | ßingen <bingen@voltanet.io> | 2017-06-28 21:32:18 +0200 |
| commit | f9e1b38e1a48b72cac7caaded16b9355c80d7899 (patch) | |
| tree | 78ad561127d3cf9e3ba6d58972c21cc40a87d326 /zebra/rt_socket.c | |
| parent | 3d07d27345fe5832045632d292ac6cdfabbc75e0 (diff) | |
Allow for more than 1 NH recursion level
Before, only one level of recursive resolution was supported.
Signed-off-by: ßingen <bingen@voltanet.io>
Diffstat (limited to 'zebra/rt_socket.c')
| -rw-r--r-- | zebra/rt_socket.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c index 9859a31627..caf4da2579 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_RO(re->nexthop, nexthop)) { if (CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_RECURSIVE)) continue; @@ -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_RO(re->nexthop, nexthop)) { if (CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_RECURSIVE)) continue; |
