original_kernel/tools/testing/selftests/net
YonglongLi 40eec1795c mptcp: pm: update add_addr counters after connect
The creation of new subflows can fail for different reasons. If no
subflow have been created using the received ADD_ADDR, the related
counters should not be updated, otherwise they will never be decremented
for events related to this ID later on.

For the moment, the number of accepted ADD_ADDR is only decremented upon
the reception of a related RM_ADDR, and only if the remote address ID is
currently being used by at least one subflow. In other words, if no
subflow can be created with the received address, the counter will not
be decremented. In this case, it is then important not to increment
pm.add_addr_accepted counter, and not to modify pm.accept_addr bit.

Note that this patch does not modify the behaviour in case of failures
later on, e.g. if the MP Join is dropped or rejected.

The "remove invalid addresses" MP Join subtest has been modified to
validate this case. The broadcast IP address is added before the "valid"
address that will be used to successfully create a subflow, and the
limit is decreased by one: without this patch, it was not possible to
create the last subflow, because:

- the broadcast address would have been accepted even if it was not
  usable: the creation of a subflow to this address results in an error,

- the limit of 2 accepted ADD_ADDR would have then been reached.

Fixes: 01cacb00b3 ("mptcp: add netlink-based PM")
Cc: stable@vger.kernel.org
Co-developed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: YonglongLi <liyonglong@chinatelecom.cn>
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://lore.kernel.org/r/20240607-upstream-net-20240607-misc-fixes-v1-3-1ab9ddfa3d00@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-06-10 19:49:10 -07:00
..
af_unix selftest: af_unix: Make SCM_RIGHTS into OOB data. 2024-05-21 13:42:08 +02:00
forwarding selftests/net: use tc rule to filter the na packet 2024-05-21 13:25:11 +02:00
hsr selftests: hsr: add missing config for CONFIG_BRIDGE 2024-06-05 10:52:04 +01:00
lib net: selftest: add test for netdev netlink queue-get API 2024-05-08 18:59:47 -07:00
mptcp mptcp: pm: update add_addr counters after connect 2024-06-10 19:49:10 -07:00
netfilter selftests: netfilter: fix packetdrill conntrack testcase 2024-05-14 10:50:31 -07:00
openvswitch selftests: openvswitch: Fix escape chars in regexp. 2024-04-17 18:27:08 -07:00
tcp_ao
.gitignore selftest: epoll_busy_poll: epoll busy poll tests 2024-05-09 12:36:46 -07:00
Makefile selftest: epoll_busy_poll: epoll busy poll tests 2024-05-09 12:36:46 -07:00
altnames.sh
amt.sh selftests: net: kill smcrouted in the cleanup logic in amt.sh 2024-05-20 11:39:07 +01:00
arp_ndisc_evict_nocarrier.sh
arp_ndisc_untracked_subnets.sh selftests/net: use tc rule to filter the na packet 2024-05-21 13:25:11 +02:00
bareudp.sh
big_tcp.sh
bind_bhash.c
bind_bhash.sh
bind_timewait.c
bind_wildcard.c
bpf.mk
bpf_offload.py
cmsg_ipv6.sh
cmsg_sender.c selftests: net: increase the delay for relative cmsg_time.sh test 2024-05-10 18:22:10 -07:00
cmsg_so_mark.sh
cmsg_time.sh selftests: net: increase the delay for relative cmsg_time.sh test 2024-05-10 18:22:10 -07:00
config selftests: net: add missing config for amt.sh 2024-05-10 18:17:51 -07:00
drop_monitor_tests.sh
epoll_busy_poll.c selftest: epoll_busy_poll: Fix spelling mistake "couldnt" -> "couldn't" 2024-05-13 13:53:53 -07:00
fcnal-test.sh
fdb_flush.sh selftests/net: convert fdb_flush.sh to run it in unique namespace 2023-12-14 18:38:36 -08:00
fib-onlink-tests.sh
fib_nexthop_multiprefix.sh
fib_nexthop_nongw.sh
fib_nexthops.sh
fib_rule_tests.sh
fib_tests.sh
fin_ack_lat.c
fin_ack_lat.sh
fq_band_pktlimit.sh
gre_gso.sh
gro.c selftests/net: add flush id selftests 2024-05-13 14:44:06 -07:00
gro.sh
hwtstamp_config.c
icmp.sh
icmp_redirect.sh
in_netns.sh
io_uring_zerocopy_tx.c
io_uring_zerocopy_tx.sh
ioam6.sh
ioam6_parser.c
ip6_gre_headroom.sh
ip_defrag.c
ip_defrag.sh selftests: net: ip_defrag: modprobe missing nf_defrag_ipv6 support 2020-07-17 12:49:18 -07:00
ip_local_port_range.c
ip_local_port_range.sh
ipsec.c
ipv6_flowlabel.c
ipv6_flowlabel.sh
ipv6_flowlabel_mgr.c
l2_tos_ttl_inherit.sh
l2tp.sh
lib.sh selftests: net: lib: set 'i' as local 2024-06-06 08:29:07 -07:00
msg_zerocopy.c
msg_zerocopy.sh
nat6to4.bpf.c
ndisc_unsolicited_na_test.sh
net_helper.sh selftests: net: more strict check in net_helper 2024-02-13 10:19:05 -08:00
netdevice.sh
netns-name.sh
nettest.c
nl_netdev.py
pmtu.sh
psock_fanout.c
psock_lib.h
psock_snd.c
psock_snd.sh
psock_tpacket.c
reuseaddr_conflict.c
reuseaddr_ports_exhausted.c
reuseaddr_ports_exhausted.sh
reuseport_addr_any.c
reuseport_addr_any.sh
reuseport_bpf.c
reuseport_bpf_cpu.c
reuseport_bpf_numa.c
reuseport_dualstack.c
route_localnet.sh
rps_default_mask.sh
rtnetlink.sh
run_afpackettests
run_netsocktests
rxtimestamp.c
rxtimestamp.sh
sample_map_ret0.bpf.c
sample_ret0.bpf.c
sctp_hello.c
sctp_vrf.sh
settings
setup_loopback.sh
setup_veth.sh
sk_bind_sendto_listen.c
sk_connect_zero_addr.c
so_incoming_cpu.c
so_netns_cookie.c
so_txtime.c
so_txtime.sh
socket.c
srv6_end_dt4_l3vpn_test.sh
srv6_end_dt6_l3vpn_test.sh
srv6_end_dt46_l3vpn_test.sh
srv6_end_flavors_test.sh
srv6_end_next_csid_l3vpn_test.sh
srv6_end_x_next_csid_l3vpn_test.sh
srv6_hencap_red_l3vpn_test.sh
srv6_hl2encap_red_l2vpn_test.sh
stress_reuseport_listen.c
stress_reuseport_listen.sh
tap.c
tcp_fastopen_backup_key.c
tcp_fastopen_backup_key.sh
tcp_inq.c
tcp_mmap.c
test_blackhole_dev.sh
test_bpf.sh
test_bridge_backup_port.sh
test_bridge_neigh_suppress.sh
test_ingress_egress_chaining.sh
test_vxlan_fdb_changelink.sh
test_vxlan_mdb.sh
test_vxlan_nolocalbypass.sh
test_vxlan_under_vrf.sh
test_vxlan_vnifiltering.sh
timestamping.c
tls.c
toeplitz.c
toeplitz.sh
toeplitz_client.sh
traceroute.sh
tun.c
txring_overwrite.c
txtimestamp.c
txtimestamp.sh
udpgro.sh
udpgro_bench.sh
udpgro_frglist.sh
udpgro_fwd.sh
udpgso.c
udpgso.sh
udpgso_bench.sh
udpgso_bench_rx.c
udpgso_bench_tx.c
unicast_extensions.sh
veth.sh
vlan_hw_filter.sh
vrf-xfrm-tests.sh
vrf_route_leaking.sh
vrf_strict_mode_test.sh
xdp_dummy.bpf.c
xfrm_policy.sh selftests/net: reduce xfrm_policy test time 2024-05-16 19:30:12 -07:00