summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_cli.c
diff options
context:
space:
mode:
authorMercury <mercury124185@gmail.com>2021-12-24 11:58:27 +0800
committerFlorin Coras <florin.coras@gmail.com>2021-12-26 23:13:40 +0000
commit89618da2f719cc6b566a7e8f428f12917aeaaea5 (patch)
treeabbdd258a08ccc360b2b2005286b523522b530c7 /src/vnet/tcp/tcp_cli.c
parent9ff617c1ac83c9e4a376959afdac6ae1e3981671 (diff)
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 <mercury124185@gmail.com> Change-Id: Ie01c31f3575e14187c6380ebcfff96fcb6098cde
Diffstat (limited to 'src/vnet/tcp/tcp_cli.c')
-rw-r--r--src/vnet/tcp/tcp_cli.c4
1 files changed, 2 insertions, 2 deletions
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,