diff options
author | Neale Ranns <nranns@cisco.com> | 2019-03-26 07:02:58 +0000 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-03-26 16:33:28 +0000 |
commit | 4c3ba81709bab8f9fcdef650e7f742fe9ddbae32 (patch) | |
tree | fb8dba665f570749b785bd5dc76dfce317367fca /src/vnet/adj/adj.c | |
parent | af3f0783b0ef189d54bb8fdf0a112347a420e9bb (diff) |
ADJ: midchain delegate to performing stacking
this can be used by e.g. tunnels so it doesn't need to be
implemented for each tunnel type.
Change-Id: I0790f89aa49f83421612b35108cce67693285999
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/adj/adj.c')
-rw-r--r-- | src/vnet/adj/adj.c | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/src/vnet/adj/adj.c b/src/vnet/adj/adj.c index 3ca3d6015f9..9d18dbf2727 100644 --- a/src/vnet/adj/adj.c +++ b/src/vnet/adj/adj.c @@ -537,10 +537,32 @@ static fib_node_back_walk_rc_t adj_back_walk_notify (fib_node_t *node, fib_node_back_walk_ctx_t *ctx) { - /* - * Que pasa. yo soj en el final! - */ - ASSERT(0); + ip_adjacency_t *adj; + + adj = ADJ_FROM_NODE(node); + + switch (adj->lookup_next_index) + { + case IP_LOOKUP_NEXT_MIDCHAIN: + adj_midchain_delegate_restack(adj_get_index(adj)); + break; + case IP_LOOKUP_NEXT_ARP: + case IP_LOOKUP_NEXT_REWRITE: + case IP_LOOKUP_NEXT_BCAST: + case IP_LOOKUP_NEXT_GLEAN: + case IP_LOOKUP_NEXT_MCAST: + case IP_LOOKUP_NEXT_MCAST_MIDCHAIN: + case IP_LOOKUP_NEXT_DROP: + case IP_LOOKUP_NEXT_PUNT: + case IP_LOOKUP_NEXT_LOCAL: + case IP_LOOKUP_NEXT_ICMP_ERROR: + case IP_LOOKUP_N_NEXT: + /* + * Que pasa. yo soj en el final! + */ + ASSERT(0); + break; + } return (FIB_NODE_BACK_WALK_CONTINUE); } |