linux-stable/net
Florian Westphal 7845914f45 netfilter: nf_tables: don't fail inserts if duplicate has expired
nftables selftests fail:
run-tests.sh testcases/sets/0044interval_overlap_0
Expected: 0-2 . 0-3, got:
W: [FAILED]     ./testcases/sets/0044interval_overlap_0: got 1

Insertion must ignore duplicate but expired entries.

Moreover, there is a strange asymmetry in nft_pipapo_activate:

It refetches the current element, whereas the other ->activate callbacks
(bitmap, hash, rhash, rbtree) use elem->priv.
Same for .remove: other set implementations take elem->priv,
nft_pipapo_remove fetches elem->priv, then does a relookup,
remove this.

I suspect this was the reason for the change that prompted the
removal of the expired check in pipapo_get() in the first place,
but skipping exired elements there makes no sense to me, this helper
is used for normal get requests, insertions (duplicate check)
and deactivate callback.

In first two cases expired elements must be skipped.

For ->deactivate(), this gets called for DELSETELEM, so it
seems to me that expired elements should be skipped as well, i.e.
delete request should fail with -ENOENT error.

Fixes: 24138933b9 ("netfilter: nf_tables: don't skip expired elements during walk")
Signed-off-by: Florian Westphal <fw@strlen.de>
2023-08-16 00:05:15 +02:00
..
6lowpan
9p 9p: remove dead stores (variable set again without being read) 2023-07-20 19:14:50 +00:00
802
8021q Revert "vlan: Fix VLAN 0 memory leak" 2023-08-14 08:14:00 +01:00
appletalk sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES) 2023-06-24 15:50:13 -07:00
atm sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES) 2023-06-24 15:50:13 -07:00
ax25 sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES) 2023-06-24 15:50:13 -07:00
batman-adv
bluetooth Bluetooth: MGMT: Use correct address for memcpy() 2023-07-20 11:27:22 -07:00
bpf
bpfilter
bridge Revert "bridge: Add extack warning when enabling STP in netns." 2023-07-20 10:46:28 +02:00
caif sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES) 2023-06-24 15:50:13 -07:00
can net: annotate data-races around sk->sk_mark 2023-07-29 18:13:41 +01:00
ceph libceph: fix potential hang in ceph_osdc_notify() 2023-08-02 09:07:34 +02:00
core bpf pull-request 2023-08-09 2023-08-10 10:41:36 -07:00
dcb net: dcb: choose correct policy to parse DCB_ATTR_BCN 2023-08-01 21:07:46 -07:00
dccp dccp: fix data-race around dp->dccps_mss_cache 2023-08-04 18:27:58 -07:00
devlink
dns_resolver
dsa net: dsa: fix older DSA drivers using phylink 2023-07-27 17:19:46 -07:00
ethernet
ethtool
handshake
hsr net: hsr: Disable promiscuous mode in offload mode 2023-06-21 16:47:05 -07:00
ieee802154 sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES) 2023-06-24 15:50:13 -07:00
ife
ipv4 net: fix the RTO timer retransmitting skb every 1ms if linear option is enabled 2023-08-15 20:24:04 +01:00
ipv6 ipv6: adjust ndisc_is_useropt() to also return true for PIO 2023-08-09 15:36:12 -07:00
iucv
kcm sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES) 2023-06-24 15:50:13 -07:00
key sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES) 2023-06-24 15:50:13 -07:00
l2tp net: annotate data-races around sk->sk_mark 2023-07-29 18:13:41 +01:00
l3mdev
lapb
llc llc: Don't drop packet from non-root netns. 2023-07-20 10:46:28 +02:00
mac80211 - New Drivers 2023-07-03 11:26:05 -07:00
mac802154 Core WPAN changes: 2023-06-24 15:41:46 -07:00
mctp sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES) 2023-06-24 15:50:13 -07:00
mpls
mptcp mptcp: fix disconnect vs accept race 2023-08-04 18:26:27 -07:00
ncsi
netfilter netfilter: nf_tables: don't fail inserts if duplicate has expired 2023-08-16 00:05:15 +02:00
netlabel netlabel: Reorder fields in 'struct netlbl_domaddr6_map' 2023-06-20 20:06:56 -07:00
netlink Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-06-27 09:45:22 -07:00
netrom sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES) 2023-06-24 15:50:13 -07:00
nfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-06-27 09:45:22 -07:00
nsh
openvswitch
packet net/packet: annotate data-races around tp->status 2023-08-04 18:03:16 -07:00
phonet sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES) 2023-06-24 15:50:13 -07:00
psample
qrtr Networking changes for 6.5. 2023-06-28 16:43:10 -07:00
rds sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES) 2023-06-24 15:50:13 -07:00
rfkill
rose sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES) 2023-06-24 15:50:13 -07:00
rxrpc Networking changes for 6.5. 2023-06-28 16:43:10 -07:00
sched net/sched: cls_route: No longer copy tcf_result on update to avoid use-after-free 2023-07-31 20:10:37 -07:00
sctp sctp: fix potential deadlock on &net->sctp.addr_wq_lock 2023-06-29 11:49:42 +02:00
smc net/smc: Use correct buffer sizes when switching between TCP and SMC 2023-08-09 11:20:29 +01:00
strparser
sunrpc NFS client updates for Linux 6.5 2023-07-01 14:38:25 -07:00
switchdev
tipc tipc: stop tipc crypto on failure in tipc_node_create 2023-07-27 11:45:05 +02:00
tls net: tls: set MSG_SPLICE_PAGES consistently 2023-08-10 11:36:57 -07:00
unix net: add missing data-race annotations around sk->sk_peek_off 2023-07-29 18:13:41 +01:00
vmw_vsock sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES) 2023-06-24 15:50:13 -07:00
wireless wifi: nl80211: fix integer overflow in nl80211_parse_mbssid_elems() 2023-08-09 14:43:35 +02:00
x25 sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES) 2023-06-24 15:50:13 -07:00
xdp xsk: fix refcount underflow in error path 2023-08-09 20:08:04 -07:00
xfrm net: annotate data-races around sk->sk_mark 2023-07-29 18:13:41 +01:00
compat.c
devres.c
Kconfig
Kconfig.debug
Makefile
socket.c Networking changes for 6.5. 2023-06-28 16:43:10 -07:00
sysctl_net.c