aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Shaw <jeffrey.b.shaw@intel.com>2017-10-09 10:02:44 -0700
committerJeff Shaw <jeffrey.b.shaw@intel.com>2017-10-09 10:10:53 -0700
commit50a852c19dbf40a4564d33c2878285552b593427 (patch)
tree8c83b64522381074a66966fc277688ae3ea6ea92
parentbea87a678f755b9d205dc95802a38ee91c0d067e (diff)
[router] Set VLIB_RX metadata to valid sw_if_index
In normal cases, some multicast frames from the control plane are dropped by VPP before being sent. We were not setting the VLIB_RX interface to a valid sw_if_index, causing a segmentation fault when updating counters in the process_drop node. Change-Id: I950158b6c36c9056ee024d2524099db03bffbf35 Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
-rw-r--r--router/router/tap_inject_node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/router/router/tap_inject_node.c b/router/router/tap_inject_node.c
index 5429846..a7e46ce 100644
--- a/router/router/tap_inject_node.c
+++ b/router/router/tap_inject_node.c
@@ -237,7 +237,7 @@ tap_rx (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * f, int fd)
b = vlib_get_buffer (vm, bi[0]);
- vnet_buffer (b)->sw_if_index[VLIB_RX] = ~0;
+ vnet_buffer (b)->sw_if_index[VLIB_RX] = sw_if_index;
vnet_buffer (b)->sw_if_index[VLIB_TX] = sw_if_index;
n_bytes_left = n_bytes - VLIB_BUFFER_DATA_SIZE;