All of lore.kernel.org
 help / color / mirror / Atom feed
* PROBLEM: nf_conntrack_events autodetect mode invalidates NETLINK_LISTEN_ALL_NSID netlink socket option
@ 2023-02-14 23:08 Bryce Kahle
  2023-02-15 10:02 ` Florian Westphal
  0 siblings, 1 reply; 8+ messages in thread
From: Bryce Kahle @ 2023-02-14 23:08 UTC (permalink / raw)
  To: fw; +Cc: netfilter-devel

nf_conntrack_events auto mode invalidates NETLINK_LISTEN_ALL_NSID
netlink socket option

commit 90d1daa45849f272b701f29d6ca88b24743c7553 introduced a
nf_conntrack_events=2 mode sysctl intended to avoid an allocation "as
long as no event listener is active in
the namespace".

The netlink socket option NETLINK_LISTEN_ALL_NSID allows a socket to
listen to events "from all network namespaces that have an nsid
assigned into the network namespace where the socket has been opened".

The effect of the above commit is that sockets in other network
namespaces (including the root network namespace) with
NETLINK_LISTEN_ALL_NSID, no longer receive events from any other
network namespace. Once you create a netlink socket in the same
network namespace as the event, then events from that network
namespace flow to all netlink sockets in all namespaces.

I attempted a workaround by setting nf_conntrack_events=1, but that
only applies in the current namespace. I believe this workaround has
no effect, because the default has been changed to 2 for all new
namespaces.

This affects kernels 5.19+. I have git bisected the kernel with a
reproducer to identify the commit above. I can publish the reproducer
on request.

Thanks,
Bryce Kahle
Datadog

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-02-27 16:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-14 23:08 PROBLEM: nf_conntrack_events autodetect mode invalidates NETLINK_LISTEN_ALL_NSID netlink socket option Bryce Kahle
2023-02-15 10:02 ` Florian Westphal
2023-02-16  1:05   ` Bryce Kahle
2023-02-16 15:18     ` Florian Westphal
2023-02-17  1:07       ` Bryce Kahle
2023-02-20 14:43       ` Pablo Neira Ayuso
2023-02-27 16:07         ` Bryce Kahle
2023-02-27 16:13           ` Florian Westphal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.