[Bug 1427] can not reuse source port to a DNATed IP if it is being used by another connection

bugzilla-daemon at netfilter.org bugzilla-daemon at netfilter.org
Fri Feb 19 14:30:52 CET 2021


https://bugzilla.netfilter.org/show_bug.cgi?id=1427

Florian Westphal <fw at strlen.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|netfilter-buglog at lists.netf |fw at strlen.de
                   |ilter.org                   |
                 CC|                            |fw at strlen.de

--- Comment #1 from Florian Westphal <fw at strlen.de> ---
I will have a look, but this might not be a conntrack problem.
>From the gist:

[root at localhost ~]# conntrack -E | grep 60974
    [NEW] tcp      6 120 SYN_SENT src=192.168.121.44 dst=10.96.0.1 sport=60974
dport=443 [UNREPLIED] src=192.168.121.1 dst=192.168.121.44 sport=6443
dport=1362
 [UPDATE] tcp      6 60 SYN_RECV src=192.168.121.44 dst=10.96.0.1 sport=60974
dport=443 src=192.168.121.1 dst=192.168.121.44 sport=6443 dport=1362
 [UPDATE] tcp      6 60 SYN_RECV src=192.168.121.44 dst=10.96.0.1 sport=60974
dport=443 src=192.168.121.1 dst=192.168.121.44 sport=6443 dport=1362
 [UPDATE] tcp      6 60 SYN_RECV src=192.168.121.44 dst=10.96.0.1 sport=60974
dport=443 src=192.168.121.1 dst=192.168.121.44 sport=6443 dport=1362
 [UPDATE] tcp      6 60 SYN_RECV src=192.168.121.44 dst=10.96.0.1 sport=60974
dport=443 src=192.168.121.1 dst=192.168.121.44 sport=6443 dport=1362
[DESTROY] tcp      6 src=192.168.121.44 dst=10.96.0.1 sport=60974 dport=443
src=192.168.121.1 dst=192.168.121.44 sport=6443 dport=1362 delta-time=67

This means conntrack picks up the 2nd request (SYN_SENT),
and also processes the syn/ack reply from peer (state changes to SYN_RECV).

The only 'bug' i see so far is the misleading "invalid" in this log message:

[60184.546120] nf_ct_tcp: invalid packet ignored in state SYN_RECV IN= OUT=
SRC=192.168.121.44 DST=10.96.0.1 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=21806 DF
PROTO=TCP SPT=60974 DPT=443 SEQ=4078343799 ACK=0 WINDOW=29200 RES=0x00 SYN
URGP=0 OPT (020405B40402080A0391C7440000000001030306) UID=0 GID=0

The packet is NOT invalid -- conntrack accepts it.

Its ignored because its another SYN packet, while kernel expects ACK (to bring
state from SYN_RECV to ESTABLISHED).  But this packet is not marked as INVALID
 and not dropped.

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.netfilter.org/pipermail/netfilter-buglog/attachments/20210219/29273eeb/attachment.html>


More information about the netfilter-buglog mailing list