From 89618da2f719cc6b566a7e8f428f12917aeaaea5 Mon Sep 17 00:00:00 2001 From: Mercury Date: Fri, 24 Dec 2021 11:58:27 +0800 Subject: tcp: set sw_if_index in tcp src-address cli the receive dpo added by tcp src-address cli do not have a valid sw_if_index , ip4_local_check_src() and tcp_input_lookup_buffer() will set ~0 to vnet_buffer(b)->sw_if_index[VLIB_RX], which will cause crash in tcp46_reset_inline, Type: fix Signed-off-by: Mercury Change-Id: Ie01c31f3575e14187c6380ebcfff96fcb6098cde --- src/vnet/tcp/tcp_cli.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vnet') diff --git a/src/vnet/tcp/tcp_cli.c b/src/vnet/tcp/tcp_cli.c index c9d6c6facd6..f7d26ff79d0 100644 --- a/src/vnet/tcp/tcp_cli.c +++ b/src/vnet/tcp/tcp_cli.c @@ -433,7 +433,7 @@ tcp_configure_v4_source_address_range (vlib_main_t * vm, /* Add local adjacencies for the range */ - receive_dpo_add_or_lock (DPO_PROTO_IP4, ~0 /* sw_if_index */ , + receive_dpo_add_or_lock (DPO_PROTO_IP4, sw_if_index /* sw_if_index */, NULL, &dpo); prefix.fp_len = 32; prefix.fp_proto = FIB_PROTOCOL_IP4; @@ -508,7 +508,7 @@ tcp_configure_v6_source_address_range (vlib_main_t * vm, ip6_neighbor_proxy_add (sw_if_index, start); /* Add a receive adjacency for this address */ - receive_dpo_add_or_lock (DPO_PROTO_IP6, ~0 /* sw_if_index */ , + receive_dpo_add_or_lock (DPO_PROTO_IP6, sw_if_index /* sw_if_index */, NULL, &dpo); fib_table_entry_special_dpo_update (fib_index, -- cgit 1.2.3-korg