summaryrefslogtreecommitdiffstats
path: root/vnet/vnet/ip
diff options
context:
space:
mode:
Diffstat (limited to 'vnet/vnet/ip')
-rw-r--r--vnet/vnet/ip/ip_input_acl.c2
-rw-r--r--vnet/vnet/ip/udp_local.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/vnet/vnet/ip/ip_input_acl.c b/vnet/vnet/ip/ip_input_acl.c
index eaf7f34eec5..6331cf4fa6b 100644
--- a/vnet/vnet/ip/ip_input_acl.c
+++ b/vnet/vnet/ip/ip_input_acl.c
@@ -322,7 +322,7 @@ ip_inacl_inline (vlib_main_t * vm,
t->sw_if_index = vnet_buffer(b0)->sw_if_index[VLIB_RX];
t->next_index = next0;
t->table_index = t0 ? t0 - vcm->tables : ~0;
- t->offset = e0 ? vnet_classify_get_offset (t0, e0): ~0;
+ t->offset = (e0 && t0) ? vnet_classify_get_offset (t0, e0): ~0;
}
/* verify speculative enqueue, maybe switch current next frame */
diff --git a/vnet/vnet/ip/udp_local.c b/vnet/vnet/ip/udp_local.c
index 9b701470934..4928d5523e4 100644
--- a/vnet/vnet/ip/udp_local.c
+++ b/vnet/vnet/ip/udp_local.c
@@ -242,8 +242,8 @@ udp46_input_inline (vlib_main_t * vm,
b0, sizeof (*tr));
if (b0->error != node->errors[UDP_ERROR_LENGTH_ERROR])
{
- tr->src_port = h0->src_port;
- tr->dst_port = h0->dst_port;
+ tr->src_port = h0 ? h0->src_port : 0;
+ tr->dst_port = h0 ? h0->dst_port : 0;
tr->bound = (next0 != UDP_INPUT_NEXT_ICMP4_ERROR &&
next0 != UDP_INPUT_NEXT_ICMP6_ERROR);
}
@@ -254,8 +254,8 @@ udp46_input_inline (vlib_main_t * vm,
b1, sizeof (*tr));
if (b1->error != node->errors[UDP_ERROR_LENGTH_ERROR])
{
- tr->src_port = h1->src_port;
- tr->dst_port = h1->dst_port;
+ tr->src_port = h1 ? h1->src_port : 0;
+ tr->dst_port = h1 ? h1->dst_port : 0;
tr->bound = (next1 != UDP_INPUT_NEXT_ICMP4_ERROR &&
next1 != UDP_INPUT_NEXT_ICMP6_ERROR);
}