diff options
author | Florin Coras <fcoras@cisco.com> | 2021-11-10 07:39:51 -0800 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2021-11-10 15:33:02 +0000 |
commit | 904638f4625c82d166d67870f9cf8088dd29a8b2 (patch) | |
tree | 0fbacfb47ccdcca5179ed1cdc91da08c2bd40cc3 /src/vnet/ip/ip6_forward.c | |
parent | 9c25eb1f4876a399919782c97e116732ea2ee628 (diff) |
ip: always set ip rx_sw_if_index
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I43f6bfa028ee37227f27a2fe0303662bf2631b10
Diffstat (limited to 'src/vnet/ip/ip6_forward.c')
-rw-r--r-- | src/vnet/ip/ip6_forward.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/vnet/ip/ip6_forward.c b/src/vnet/ip/ip6_forward.c index b9f9892f929..833ce142999 100644 --- a/src/vnet/ip/ip6_forward.c +++ b/src/vnet/ip/ip6_forward.c @@ -1481,8 +1481,10 @@ ip6_local_inline (vlib_main_t *vm, vlib_node_runtime_t *node, } else { - vnet_buffer (b[0])->ip.rx_sw_if_index = ~0; - vnet_buffer (b[1])->ip.rx_sw_if_index = ~0; + vnet_buffer (b[0])->ip.rx_sw_if_index = + vnet_buffer (b[0])->ip.adj_index[VLIB_RX]; + vnet_buffer (b[1])->ip.rx_sw_if_index = + vnet_buffer (b[1])->ip.adj_index[VLIB_RX]; } } /* head_of_feature_arc */ @@ -1618,7 +1620,8 @@ ip6_local_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vnet_buffer (b[0])->ip.rx_sw_if_index = rd->rd_sw_if_index; } else - vnet_buffer (b[0])->ip.rx_sw_if_index = ~0; + vnet_buffer (b[0])->ip.rx_sw_if_index = + vnet_buffer (b[0])->ip.adj_index[VLIB_RX]; } /* head_of_feature_arc */ next[0] = lm->local_next_by_ip_protocol[ip->protocol]; |