mirror-linux/tools/testing/selftests/net
Paolo Abeni aef3a58b06 netfilter pull request 24-09-26
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEN9lkrMBJgcdVAPub1V2XiooUIOQFAmb1P8AACgkQ1V2XiooU
 IOT2KQ/9Gpf66VH41Byae9qzpgS+iRWUkN3Apn/5m7io/v0AuEmDfDRCPcOH/k8N
 61m5RGBzuZETR3YhmlzzvMv5WXmHJmUCGjWm5M2b6Byji13GsdgTqJ3VXwgQXINI
 tuE2bRTRzm5oBOsJvTENb5X7A3Bmjnk93N4jJSQgQNzO+fTNgiUQxszrUc2llQLS
 D85VC94AtNu3fKbv+sv76yWGdR+srq2ePeN+6lDT/Hx6sqnU+uWziYaSXLTmWd9S
 va+yOgi2t0gJkCZqfR/Aw8fQJSpCLWFIy4LBJa1fFX6ni462w2c7VOMPHnJ3PlOy
 QG+UAH2brpRyIVn3IBzEeBDb1ZhrsHKsEaUz84LHs22XbZCCZ4xAfe0DsFmxC0o3
 TW9f0RA9geRlnZOxHJRHc8I6Edi4B3oBcvbEe6PaoHeQJCUqfVJp8dgkLT0IvySJ
 TWYQEx8A/fSBKmr8QQ9L/wEomTTnvLuW5GW4dyOsfoyS7DKd9wgIycujakqmowIA
 ZnaXmosCtopNGrf5lxKsWYDac4VKLJufzjCj/4b7Q1BBaJXmSj0xVD0/0fSJeijk
 t9nfvvOwBKBYOoZOwYK2KD+YmMwxSuHz48yE0WZANoRnTP/gwFhY9bDmonqOi7+e
 L5Vbtv6QZtnChnHCSkRzXEkmKUIlzMoi607suV1jYmmDiEQoa+A=
 =a9OT
 -----END PGP SIGNATURE-----

Merge tag 'nf-24-09-26' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf

Pablo Neira Ayuso says:

====================
Netfilter fixes for net

v2: with kdoc fixes per Paolo Abeni.

The following patchset contains Netfilter fixes for net:

Patch #1 and #2 handle an esoteric scenario: Given two tasks sending UDP
packets to one another, two packets of the same flow in each direction
handled by different CPUs that result in two conntrack objects in NEW
state, where reply packet loses race. Then, patch #3 adds a testcase for
this scenario. Series from Florian Westphal.

1) NAT engine can falsely detect a port collision if it happens to pick
   up a reply packet as NEW rather than ESTABLISHED. Add extra code to
   detect this and suppress port reallocation in this case.

2) To complete the clash resolution in the reply direction, extend conntrack
   logic to detect clashing conntrack in the reply direction to existing entry.

3) Adds a test case.

Then, an assorted list of fixes follow:

4) Add a selftest for tproxy, from Antonio Ojea.

5) Guard ctnetlink_*_size() functions under
   #if defined(CONFIG_NETFILTER_NETLINK_GLUE_CT) || defined(CONFIG_NF_CONNTRACK_EVENTS)
   From Andy Shevchenko.

6) Use -m socket --transparent in iptables tproxy documentation.
   From XIE Zhibang.

7) Call kfree_rcu() when releasing flowtable hooks to address race with
   netlink dump path, from Phil Sutter.

8) Fix compilation warning in nf_reject with CONFIG_BRIDGE_NETFILTER=n.
   From Simon Horman.

9) Guard ctnetlink_label_size() under CONFIG_NF_CONNTRACK_EVENTS which
   is its only user, to address a compilation warning. From Simon Horman.

10) Use rcu-protected list iteration over basechain hooks from netlink
    dump path.

11) Fix memcg for nf_tables, use GFP_KERNEL_ACCOUNT is not complete.

12) Remove old nfqueue conntrack clash resolution. Instead trying to
    use same destination address consistently which requires double DNAT,
    use the existing clash resolution which allows clashing packets
    go through with different destination. Antonio Ojea originally
    reported an issue from the postrouting chain, I proposed a fix:
    https://lore.kernel.org/netfilter-devel/ZuwSwAqKgCB2a51-@calendula/T/
    which he reported it did not work for him.

13) Adds a selftest for patch 12.

14) Fixes ipvs.sh selftest.

netfilter pull request 24-09-26

* tag 'nf-24-09-26' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf:
  selftests: netfilter: Avoid hanging ipvs.sh
  kselftest: add test for nfqueue induced conntrack race
  netfilter: nfnetlink_queue: remove old clash resolution logic
  netfilter: nf_tables: missing objects with no memcg accounting
  netfilter: nf_tables: use rcu chain hook list iterator from netlink dump path
  netfilter: ctnetlink: compile ctnetlink_label_size with CONFIG_NF_CONNTRACK_EVENTS
  netfilter: nf_reject: Fix build warning when CONFIG_BRIDGE_NETFILTER=n
  netfilter: nf_tables: Keep deleted flowtable hooks until after RCU
  docs: tproxy: ignore non-transparent sockets in iptables
  netfilter: ctnetlink: Guard possible unused functions
  selftests: netfilter: nft_tproxy.sh: add tcp tests
  selftests: netfilter: add reverse-clash resolution test case
  netfilter: conntrack: add clash resolution for reverse collisions
  netfilter: nf_nat: don't try nat source port reallocation for reverse dir clash
====================

Link: https://patch.msgid.link/20240926110717.102194-1-pablo@netfilter.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2024-09-26 15:47:11 +02:00
..
af_unix af_unix: Don't return OOB skb in manage_oob(). 2024-09-09 17:14:27 -07:00
forwarding netdev_features: convert NETIF_F_NETNS_LOCAL to dev->netns_local 2024-09-03 11:36:43 +02:00
hsr Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-06-06 12:06:56 -07:00
lib Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-09-12 17:11:24 -07:00
mptcp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-09-12 17:11:24 -07:00
netfilter selftests: netfilter: Avoid hanging ipvs.sh 2024-09-26 13:03:03 +02:00
openvswitch selftests: openvswitch: retry instead of sleep 2024-07-11 18:11:31 -07:00
packetdrill selftests/net: packetdrill: increase timing tolerance in debug mode 2024-09-26 11:03:57 +02:00
rds selftests: rds: add testing infrastructure 2024-08-09 13:18:46 +01:00
tcp_ao selftests/net: Add trace events matching to tcp_ao 2024-08-27 14:11:27 -07:00
.gitignore selftests: add ncdevmem, netcat for devmem TCP 2024-09-11 20:44:32 -07:00
Makefile selftests: add ncdevmem, netcat for devmem TCP 2024-09-11 20:44:32 -07:00
altnames.sh
amt.sh selftests: net: change shebang to bash in amt.sh 2024-06-21 14:27:22 +01:00
arp_ndisc_evict_nocarrier.sh selftests/net: convert arp_ndisc_evict_nocarrier.sh to run it in unique namespace 2023-12-05 13:00:55 +01:00
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 selftests: net: let big_tcp test cope with slow env 2024-02-05 12:36:16 +00:00
bind_bhash.c
bind_bhash.sh selftests/net: Improve bind_bhash.sh to accommodate predictable network interface names 2023-09-10 18:49:29 +01:00
bind_timewait.c
bind_wildcard.c selftest: tcp: Add bind() tests for SO_REUSEADDR/SO_REUSEPORT. 2024-03-29 14:48:39 -07:00
bpf.mk selftests: net: extract BPF building logic from the Makefile 2024-04-24 20:15:45 -07:00
bpf_offload.py selftests: net: reuse common code in bpf_offload 2024-04-10 14:03:12 -07:00
cmsg_ipv6.sh selftests: cmsg_ipv6: repeat the exact packet 2024-02-07 13:38:14 +00:00
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 selftests/net: convert cmsg tests to make them run in unique namespace 2023-12-05 13:00:56 +01:00
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 config for openvswitch 2024-06-27 15:50:08 -07:00
drop_monitor_tests.sh selftests/net: convert drop_monitor_tests.sh to run it in unique namespace 2023-12-05 13:00:56 +01:00
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 selftests: net: add helper for checking if nettest is available 2024-08-22 12:55:47 +02:00
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 selftests/net: convert fib-onlink-tests.sh to run it in unique namespace 2023-12-14 18:38:35 -08:00
fib_nexthop_multiprefix.sh selftests/net: convert fib_nexthop_multiprefix to run it in unique namespace 2023-12-14 18:38:35 -08:00
fib_nexthop_nongw.sh selftests/net: convert fib_nexthop_nongw.sh to run it in unique namespace 2023-12-14 18:38:35 -08:00
fib_nexthops.sh selftests: fib_nexthops: Test 16-bit next hop weights 2024-08-12 17:50:35 -07:00
fib_rule_tests.sh selftests: fib_rule_tests: Add DSCP selector connect tests 2024-09-13 21:15:45 -07:00
fib_tests.sh ipv4: Fix incorrect TOS in fibmatch route get reply 2024-07-18 11:11:02 +02:00
fin_ack_lat.c
fin_ack_lat.sh
fq_band_pktlimit.sh selftests/net: calibrate fq_band_pktlimit 2024-01-31 11:11:09 +00:00
gre_gso.sh selftests/net: convert gre_gso.sh to run it in unique namespace 2023-12-23 00:26:32 +00:00
gro.c selftests/net: add flush id selftests 2024-05-13 14:44:06 -07:00
gro.sh selftests: net: cope with slow env in gro.sh test 2024-02-13 10:10:11 -08:00
hwtstamp_config.c
icmp.sh sleftests/net: convert icmp.sh to run it in unique namespace 2023-12-05 13:00:56 +01:00
icmp_redirect.sh selftests/net: convert icmp_redirect.sh to run it in unique namespace 2023-12-05 13:00:56 +01:00
in_netns.sh
io_uring_zerocopy_tx.c selftests/net: Extract uring helpers to be reusable 2023-10-19 16:42:03 -06:00
io_uring_zerocopy_tx.sh selftests/net: optmem_max became per netns 2023-12-15 11:01:27 +00:00
ioam6.sh selftests: ioam: refactoring to align with the fix 2024-02-22 09:28:03 +01:00
ioam6_parser.c selftests: ioam: refactoring to align with the fix 2024-02-22 09:28:03 +01:00
ip6_gre_headroom.sh
ip_defrag.c
ip_defrag.sh
ip_local_port_range.c selftests/net: fix uninitialized variables 2024-05-07 17:22:18 -07:00
ip_local_port_range.sh
ipsec.c selftests/net: ipsec: fix constant out of range 2023-11-27 18:12:07 -08:00
ipv6_flowlabel.c
ipv6_flowlabel.sh
ipv6_flowlabel_mgr.c
l2_tos_ttl_inherit.sh
l2tp.sh selftests/net: convert l2tp.sh to run it in unique namespace 2023-12-05 13:00:56 +01:00
lib.sh selftests: net: add helper for checking if nettest is available 2024-08-22 12:55:47 +02:00
msg_zerocopy.c selftests: make order checking verbose in msg_zerocopy selftest 2024-07-03 19:42:32 -07:00
msg_zerocopy.sh selftests/net: optmem_max became per netns 2023-12-15 11:01:27 +00:00
nat6to4.bpf.c selftests: net: name bpf objects consistently and simplify Makefile 2024-04-24 20:15:45 -07:00
ncdevmem.c selftests: add ncdevmem, netcat for devmem TCP 2024-09-11 20:44:32 -07:00
ndisc_unsolicited_na_test.sh selftests/net: convert ndisc_unsolicited_na_test.sh to run it in unique namespace 2023-12-05 13:00:56 +01:00
net_helper.sh selftests: net: more strict check in net_helper 2024-02-13 10:19:05 -08:00
netdevice.sh selftests: net: Use XFAIL for operations not supported by the driver 2024-08-22 16:56:06 -07:00
netns-name.sh selftests/net: convert netns-name.sh to run it in unique namespace 2023-12-23 00:26:32 +00:00
netns-sysctl.sh selftests: net: tests net.core.{r,w}mem_{default,max} sysctls in a netns 2024-06-01 16:03:21 -07:00
nettest.c selftests: net: remove unused variables 2023-10-16 09:20:08 +01:00
nl_netdev.py selftests: net: set the exit code correctly in Python tests 2024-04-18 16:15:31 -07:00
pmtu.sh selftests: net: add helper for checking if nettest is available 2024-08-22 12:55:47 +02:00
psock_fanout.c selftests: net: convert comma to semicolon 2024-09-04 16:55:49 -07:00
psock_lib.h
psock_snd.c
psock_snd.sh
psock_tpacket.c
reuseaddr_conflict.c selftests: reuseaddr_conflict: add missing new line at the end of the output 2024-04-01 20:42:45 -07:00
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 selftests: net: change ifconfig with ip command 2023-10-24 13:53:39 -07:00
rps_default_mask.sh selftests: net: fix rps_default_mask with >32 CPUs 2024-01-24 13:55:19 -08:00
rtnetlink.sh netdevsim: fix rtnetlink.sh selftest 2024-03-01 10:43:10 +00:00
run_afpackettests
run_netsocktests
rxtimestamp.c net-timestamp: add selftests for SOF_TIMESTAMPING_OPT_RX_FILTER 2024-09-10 16:55:23 -07:00
rxtimestamp.sh
sample_map_ret0.bpf.c selftests: net: declare section names for bpf_offload 2024-04-10 14:03:12 -07:00
sample_ret0.bpf.c selftests: net: declare section names for bpf_offload 2024-04-10 14:03:12 -07:00
sctp_hello.c
sctp_vrf.sh selftests/net: convert sctp_vrf.sh to run it in unique namespace 2023-12-05 13:00:56 +01:00
settings selftests/net: convert fcnal-test.sh to run it in unique namespace 2023-12-14 18:38:35 -08:00
setup_loopback.sh selftests: net: Remove executable bits from library scripts 2024-02-01 08:36:29 -08:00
setup_veth.sh selftests: net: give more time for GRO aggregation 2024-01-26 14:11:57 -08:00
sk_bind_sendto_listen.c
sk_connect_zero_addr.c
sk_so_peek_off.c selftests: add selftest for UDP SO_PEEK_OFF support 2024-09-04 13:10:43 +01:00
so_incoming_cpu.c selftest: Don't reuse port for SO_INCOMING_CPU test. 2024-01-23 10:48:07 +01:00
so_netns_cookie.c
so_txtime.c selftests/net: ignore timing errors in so_txtime if KSFT_MACHINE_SLOW 2024-02-06 10:19:06 +01:00
so_txtime.sh selftests: net: cope with slow env in so_txtime.sh test 2024-02-13 10:10:44 -08:00
socket.c
srv6_end_dt4_l3vpn_test.sh selftests/net: convert srv6_end_dt4_l3vpn_test.sh to run it in unique namespace 2023-12-14 18:38:34 -08:00
srv6_end_dt6_l3vpn_test.sh selftests/net: convert srv6_end_dt6_l3vpn_test.sh to run it in unique namespace 2023-12-14 18:38:35 -08:00
srv6_end_dt46_l3vpn_test.sh selftests/net: convert srv6_end_dt46_l3vpn_test.sh to run it in unique namespace 2023-12-14 18:38:34 -08:00
srv6_end_dx4_netfilter_test.sh selftests: add selftest for the SRv6 End.DX4 behavior with netfilter 2024-06-19 18:42:10 +02:00
srv6_end_dx6_netfilter_test.sh selftests: add selftest for the SRv6 End.DX6 behavior with netfilter 2024-06-19 18:42:10 +02:00
srv6_end_flavors_test.sh
srv6_end_next_csid_l3vpn_test.sh
srv6_end_x_next_csid_l3vpn_test.sh selftests: seg6: add selftest for NEXT-C-SID flavor in SRv6 End.X behavior 2023-08-15 18:51:47 -07:00
srv6_hencap_red_l3vpn_test.sh
srv6_hl2encap_red_l2vpn_test.sh
stress_reuseport_listen.c
stress_reuseport_listen.sh selftests/net: convert stress_reuseport_listen.sh to run it in unique namespace 2023-12-23 00:26:32 +00:00
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 selftests: net: Fix bridge backup port test flakiness 2024-02-09 11:29:52 -08:00
test_bridge_neigh_suppress.sh selftests: test_bridge_neigh_suppress.sh: Fix failures due to duplicate MAC 2024-05-08 06:24:36 -07:00
test_ingress_egress_chaining.sh
test_vxlan_fdb_changelink.sh
test_vxlan_mdb.sh selftests: vxlan_mdb: Fix failures with old libnet 2024-03-26 12:29:25 +01:00
test_vxlan_nolocalbypass.sh selftests/net: convert test_vxlan_nolocalbypass.sh to run it in unique namespace 2023-12-08 12:12:16 +00:00
test_vxlan_under_vrf.sh selftests/net: convert test_vxlan_under_vrf.sh to run it in unique namespace 2023-12-08 12:12:16 +00:00
test_vxlan_vnifiltering.sh selftests/net: convert test_vxlan_vnifiltering.sh to run it in unique namespace 2023-12-08 12:12:16 +00:00
timestamping.c
tls.c selftests: tls: add test with a partially invalid iov 2024-03-26 20:48:24 -07:00
toeplitz.c
toeplitz.sh selftests/net: use unique netns name for setup_loopback.sh setup_veth.sh 2023-12-23 00:26:32 +00:00
toeplitz_client.sh
traceroute.sh selftests/net: convert traceroute.sh to run it in unique namespace 2023-12-05 13:00:56 +01:00
tun.c
txring_overwrite.c
txtimestamp.c selftests: return failure when timestamps can't be reported 2024-09-09 16:42:28 -07:00
txtimestamp.sh selftests/net: calibrate txtimestamp 2024-01-31 10:22:13 -08:00
udpgro.sh selftests: udpgro: no need to load xdp for gro 2024-08-19 09:54:24 +01:00
udpgro_bench.sh selftests: net: name bpf objects consistently and simplify Makefile 2024-04-24 20:15:45 -07:00
udpgro_frglist.sh selftests: net: name bpf objects consistently and simplify Makefile 2024-04-24 20:15:45 -07:00
udpgro_fwd.sh selftests: net: name bpf objects consistently and simplify Makefile 2024-04-24 20:15:45 -07:00
udpgso.c selftests/net: Add coverage for UDP GSO with IPv6 extension headers 2024-08-09 21:58:08 -07:00
udpgso.sh selftests/net: Add test coverage for UDP GSO software fallback 2024-06-28 18:13:00 -07:00
udpgso_bench.sh
udpgso_bench_rx.c selftests: net: cut more slack for gro fwd tests. 2024-02-02 21:10:36 -08:00
udpgso_bench_tx.c
unicast_extensions.sh selftests: net: add helper for checking if nettest is available 2024-08-22 12:55:47 +02:00
veth.sh selftests: net: name bpf objects consistently and simplify Makefile 2024-04-24 20:15:45 -07:00
vlan_hw_filter.sh selftests: add vlan hw filter tests 2023-12-19 13:13:56 +01:00
vrf-xfrm-tests.sh selftests/net: convert vrf-xfrm-tests.sh to run it in unique namespace 2023-12-08 12:12:16 +00:00
vrf_route_leaking.sh selftests: net: add helper for checking if nettest is available 2024-08-22 12:55:47 +02:00
vrf_strict_mode_test.sh selftests/net: convert vrf_strict_mode_test.sh to run it in unique namespace 2023-12-08 12:12:16 +00:00
xdp_dummy.bpf.c selftests: net: name bpf objects consistently and simplify Makefile 2024-04-24 20:15:45 -07:00
xfrm_policy.sh selftests/net: reduce xfrm_policy test time 2024-05-16 19:30:12 -07:00
xfrm_policy_add_speed.sh selftests: add xfrm policy insertion speed test script 2024-08-24 09:55:01 +02:00
ynl.mk tools: net: package libynl for use in selftests 2024-07-02 18:59:33 -07:00