aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/srv6/sr_api.c10
-rw-r--r--src/vnet/tcp/tcp_input.c3
2 files changed, 12 insertions, 1 deletions
diff --git a/src/vnet/srv6/sr_api.c b/src/vnet/srv6/sr_api.c
index 925b50a1689..623f672a204 100644
--- a/src/vnet/srv6/sr_api.c
+++ b/src/vnet/srv6/sr_api.c
@@ -60,6 +60,9 @@ static void vl_api_sr_localsid_add_del_t_handler
* char end_psp, u8 behavior, u32 sw_if_index, u32 vlan_index, u32 fib_table,
* ip46_address_t *nh_addr, void *ls_plugin_mem)
*/
+
+ VALIDATE_SW_IF_INDEX (mp);
+
rv = sr_cli_localsid (mp->is_del,
(ip6_address_t *) & mp->localsid_addr,
mp->end_psp,
@@ -69,6 +72,8 @@ static void vl_api_sr_localsid_add_del_t_handler
ntohl (mp->fib_table),
(ip46_address_t *) & mp->nh_addr, NULL);
+ BAD_SW_IF_INDEX_LABEL;
+
REPLY_MACRO (VL_API_SR_LOCALSID_ADD_DEL_REPLY);
}
@@ -158,6 +163,9 @@ static void vl_api_sr_steering_add_del_t_handler
* u32 table_id, ip46_address_t *prefix, u32 mask_width, u32 sw_if_index,
* u8 traffic_type)
*/
+
+ VALIDATE_SW_IF_INDEX (mp);
+
rv = sr_steering_policy (mp->is_del,
(ip6_address_t *) & mp->bsid_addr,
ntohl (mp->sr_policy_index),
@@ -166,6 +174,8 @@ static void vl_api_sr_steering_add_del_t_handler
ntohl (mp->mask_width),
ntohl (mp->sw_if_index), mp->traffic_type);
+ BAD_SW_IF_INDEX_LABEL;
+
REPLY_MACRO (VL_API_SR_STEERING_ADD_DEL_REPLY);
}
diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c
index 62dcdc5e711..63d6fd8785b 100644
--- a/src/vnet/tcp/tcp_input.c
+++ b/src/vnet/tcp/tcp_input.c
@@ -2163,7 +2163,8 @@ tcp46_syn_sent_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
drop:
b0->error = error0 ? node->errors[error0] : 0;
- if (PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED))
+ if (PREDICT_FALSE
+ ((b0->flags & VLIB_BUFFER_IS_TRACED) && tcp0 != 0))
{
t0 = vlib_add_trace (vm, node, b0, sizeof (*t0));
clib_memcpy (&t0->tcp_header, tcp0, sizeof (t0->tcp_header));