Florian Westphal 19c942f7d2 netfilter: nfnetlink: re-enable conntrack expectation events
commit 0b2f3212b551a87fe936701fa0813032861a3308 upstream.

To avoid allocation of the conntrack extension area when possible,
the default behaviour was changed to only allocate the event extension
if a userspace program is subscribed to a notification group.

Problem is that while 'conntrack -E' does enable the event allocation
behind the scenes, 'conntrack -E expect' does not: no expectation events
are delivered unless user sets
"net.netfilter.nf_conntrack_events" back to 1 (always on).

Fix the autodetection to also consider EXP type group.

We need to track the 6 event groups (3+3, new/update/destroy for events and
for expectations each) independently, else we'd disable events again
if an expectation group becomes empty while there is still an active
event group.

Fixes: 2794cdb0b97b ("netfilter: nfnetlink: allow to detect if ctnetlink listeners exist")
Reported-by: Yi Chen <yiche@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-08-25 11:45:30 +02:00
..
2020-10-12 10:06:39 +02:00
2022-04-15 14:28:50 -07:00
2021-07-29 15:06:50 +01:00
2021-04-02 14:31:44 -07:00
2022-03-01 14:25:12 +00:00
2022-03-18 07:23:12 +01:00