diff options
| author | Pablo Neira Ayuso <pablo@netfilter.org> | 2026-07-13 00:26:04 +0200 |
|---|---|---|
| committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2026-07-22 20:34:28 +0200 |
| commit | 4aa63842fc92de1bce59d4709a0d32e718890bb2 (patch) | |
| tree | 26b46777ca530046053a217ee10a31df1f9051bc /include/linux/timerqueue.h | |
| parent | 1d6123f87eebb5148844cd43045c6e598799720b (diff) | |
netfilter: nf_conntrack_expect: add and use nf_ct_expect_related_pair()
Add a new function to insert a pair of expectations, this is required by
the SIP and H323 NAT helpers. The spinlock is held to check if there is
a slot for both expectations, in such case, insert them.
This removes the need for nf_ct_unexpect_related() inside the loop to
find a pair of consecutive ports, otherwise inserting expectations whose
dead flag is already set on can happen.
Bump master_help->expecting for the expectation class after checking if
the expectation fits in the master expectation list, which is needed for
this new _pair() function variant to run the eviction routine including
the preallocated slot for the first expectation in the pair.
Fixes: b8b09dc2bf35 ("netfilter: nf_conntrack_expect: use conntrack GC to reap expectations")
Reported-by: Jaeyeong Lee <iostreampy@proton.me>
Link: https://patch.msgid.link/178377968720.33756.12204817361601593230@proton.me/
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
