aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/lb/node.c5
-rw-r--r--src/plugins/nsim/node.c8
2 files changed, 8 insertions, 5 deletions
diff --git a/src/plugins/lb/node.c b/src/plugins/lb/node.c
index 8163e35a06e..ab192af11aa 100644
--- a/src/plugins/lb/node.c
+++ b/src/plugins/lb/node.c
@@ -646,13 +646,14 @@ lb_nodeport_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
entry0 = hash_get_mem(lbm->vip_index_by_nodeport, &(udp_0->dst_port));
//Enqueue to next
- vnet_buffer(p0)->ip.adj_index[VLIB_TX] = entry0[0];
+ vnet_buffer(p0)->ip.adj_index[VLIB_TX] = entry0 ? entry0[0]
+ : ADJ_INDEX_INVALID;
if (PREDICT_FALSE(p0->flags & VLIB_BUFFER_IS_TRACED))
{
lb_nodeport_trace_t *tr = vlib_add_trace (vm, node, p0,
sizeof(*tr));
- tr->vip_index = entry0[0];
+ tr->vip_index = entry0 ? entry0[0] : ADJ_INDEX_INVALID;
tr->node_port = (u32) clib_net_to_host_u16 (udp_0->dst_port);
}
diff --git a/src/plugins/nsim/node.c b/src/plugins/nsim/node.c
index e78e74482ff..dfd0bf747f1 100644
--- a/src/plugins/nsim/node.c
+++ b/src/plugins/nsim/node.c
@@ -125,7 +125,10 @@ nsim_inline (vlib_main_t * vm,
ep->current_length);
}
else /* out of wheel space, drop pkt */
- b[0]->error = no_buffer_error;
+ {
+ b[0]->error = no_buffer_error;
+ is_drop0 = 1;
+ }
if (is_trace)
{
@@ -134,8 +137,7 @@ nsim_inline (vlib_main_t * vm,
nsim_trace_t *t = vlib_add_trace (vm, node, b[0], sizeof (*t));
t->expires = expires;
t->is_drop = is_drop0;
- if (is_drop0 == 0)
- t->tx_sw_if_index = ep->tx_sw_if_index;
+ t->tx_sw_if_index = (is_drop0 == 0) ? ep->tx_sw_if_index : 0;
}
}