summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ip')
-rw-r--r--src/vnet/ip/ip4_forward.c8
-rw-r--r--src/vnet/ip/ip6_forward.c9
2 files changed, 11 insertions, 6 deletions
diff --git a/src/vnet/ip/ip4_forward.c b/src/vnet/ip/ip4_forward.c
index 900a1b4ce8e..58af706e2b2 100644
--- a/src/vnet/ip/ip4_forward.c
+++ b/src/vnet/ip/ip4_forward.c
@@ -1534,7 +1534,7 @@ ip4_local_check_src (vlib_buffer_t *b, ip4_header_t *ip0,
vnet_buffer (b)->ip.rx_sw_if_index = rd->rd_sw_if_index;
}
else
- vnet_buffer (b)->ip.rx_sw_if_index = ~0;
+ vnet_buffer (b)->ip.rx_sw_if_index = vnet_buffer (b)->sw_if_index[VLIB_RX];
/*
* vnet_buffer()->ip.adj_index[VLIB_RX] will be set to the index of the
@@ -1622,8 +1622,10 @@ ip4_local_check_src_x2 (vlib_buffer_t **b, ip4_header_t **ip,
}
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])->sw_if_index[VLIB_RX];
+ vnet_buffer (b[1])->ip.rx_sw_if_index =
+ vnet_buffer (b[1])->sw_if_index[VLIB_RX];
}
/*
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];