From nobody Sat Sep 04 11:19:52 2021 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1B88617A98AB; Sat, 4 Sep 2021 11:20:03 +0000 (UTC) (envelope-from michael.tuexen@lurchi.franken.de) Received: from drew.franken.de (mail-n.franken.de [193.175.24.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "Sectigo RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H1sdZ6LQhz3Mdg; Sat, 4 Sep 2021 11:20:02 +0000 (UTC) (envelope-from michael.tuexen@lurchi.franken.de) Received: from smtpclient.apple (unknown [IPv6:2a00:20:6007:7124:ecf2:f868:d2a1:762b]) (Authenticated sender: lurchi) by mail-n.franken.de (Postfix) with ESMTPSA id 77127721E282E; Sat, 4 Sep 2021 13:19:53 +0200 (CEST) Content-Type: text/plain; charset=us-ascii List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: TCP connection ignore RST From: Michael Tuexen In-Reply-To: <20210904023730.5eddd6fd@rimwks.local> Date: Sat, 4 Sep 2021 13:19:52 +0200 Cc: freebsd-net@freebsd.org, freebsd-hackers@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <927CA9E9-AB74-443D-83A7-931325DB7686@lurchi.franken.de> References: <20210904023730.5eddd6fd@rimwks.local> To: Rozhuk Ivan X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-Rspamd-Queue-Id: 4H1sdZ6LQhz3Mdg X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; TAGGED_RCPT(0.00)[]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N > On 4. Sep 2021, at 01:37, Rozhuk Ivan wrote: >=20 > Hi! >=20 >=20 > I have strange case: FreeBSD 12.2 ignore TCP RST from windows host and = continue retransmitting packets. > sockstat show that socket connected even after many tcp rst packets = received. >=20 > Any ideas how to fix it? Where is the trace taken? On the Windows side or on the FreeBSD side or = somewhere else? Could you provide the .pcap file? Best regards Michael >=20 >=20 > System build from: > commit 8c01699f9194cfa3805ac734ae912529a10c063a > CommitDate: Wed Jan 20 14:40:13 2021 +0100 > Add some examples to script.1... >=20 >=20 > root@sa# sockstat -P tcp -v -s -S -p 389 > USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN = ADDRESS PATH STATE CONN STATE STACK =20= > a s 2583 35 tcp4 192.168.33.89:62284 = 192.168.33.200:389 ESTABLISHED freebsd >=20 >=20 >=20 > root@sa# tcpdump -n -vvvvvvvv -i vmx0 tcp port 389 > tcpdump: listening on vmx0, link-type EN10MB (Ethernet), capture size = 262144 bytes > 01:32:19.128521 IP (tos 0x0, ttl 128, id 40117, offset 0, flags = [none], proto TCP (6), length 60) > 192.168.33.89.62284 > 192.168.33.200.389: Flags [S], cksum 0xc4a0 = (incorrect -> 0x4ba5), seq 3223907587, win 65535, options [mss = 1460,nop,wscale 10,sackOK,TS val 3640114415 ecr 0], length 0 > 01:32:19.128918 IP (tos 0x0, ttl 128, id 22220, offset 0, flags [DF], = proto TCP (6), length 60) > 192.168.33.200.389 > 192.168.33.89.62284: Flags [S.], cksum 0xca32 = (correct), seq 1489249264, ack 3223907588, win 8192, options [mss = 1460,nop,wscale 8,sackOK,TS val 124116297 ecr 3640114415], length 0 > 01:32:19.128949 IP (tos 0x0, ttl 128, id 42613, offset 0, flags = [none], proto TCP (6), length 52) > 192.168.33.89.62284 > 192.168.33.200.389: Flags [.], cksum 0xc498 = (incorrect -> 0x10ff), seq 1, ack 1, win 2049, options [nop,nop,TS val = 3640114415 ecr 124116297], length 0 > 01:32:19.129431 IP (tos 0x0, ttl 128, id 24596, offset 0, flags = [none], proto TCP (6), length 86) > 192.168.33.89.62284 > 192.168.33.200.389: Flags [P.], cksum 0xc4ba = (incorrect -> 0xe4b3), seq 1:35, ack 1, win 2049, options [nop,nop,TS = val 3640114415 ecr 124116297], length 34 > 01:32:19.130310 IP (tos 0x0, ttl 128, id 22221, offset 0, flags [DF], = proto TCP (6), length 74) > 192.168.33.200.389 > 192.168.33.89.62284: Flags [P.], cksum 0x35bb = (correct), seq 1:23, ack 35, win 260, options [nop,nop,TS val 124116297 = ecr 3640114415], length 22 > 01:32:19.131230 IP (tos 0x0, ttl 128, id 54687, offset 0, flags = [none], proto TCP (6), length 163) > 192.168.33.89.62284 > 192.168.33.200.389: Flags [P.], cksum 0xc507 = (incorrect -> 0x37f8), seq 35:146, ack 23, win 2049, options [nop,nop,TS = val 3640114415 ecr 124116297], length 111 > 01:32:19.131560 IP (tos 0x0, ttl 128, id 22222, offset 0, flags [DF], = proto TCP (6), length 585) > 192.168.33.200.389 > 192.168.33.89.62284: Flags [P.], cksum 0x943d = (correct), seq 23:556, ack 146, win 259, options [nop,nop,TS val = 124116297 ecr 3640114415], length 533 > 01:32:19.133323 IP (tos 0x0, ttl 128, id 50714, offset 0, flags = [none], proto TCP (6), length 198) > 192.168.33.89.62284 > 192.168.33.200.389: Flags [P.], cksum 0xc52a = (incorrect -> 0x0ba5), seq 146:292, ack 556, win 2049, options = [nop,nop,TS val 3640114415 ecr 124116297], length 146 > 01:32:19.133861 IP (tos 0x0, ttl 128, id 22223, offset 0, flags [DF], = proto TCP (6), length 471) > 192.168.33.200.389 > 192.168.33.89.62284: Flags [P.], cksum 0x3b5d = (correct), seq 556:975, ack 292, win 259, options [nop,nop,TS val = 124116298 ecr 3640114415], length 419 > 01:32:19.135305 IP (tos 0x0, ttl 128, id 43284, offset 0, flags = [none], proto TCP (6), length 115) > 192.168.33.89.62284 > 192.168.33.200.389: Flags [P.], cksum 0xc4d7 = (incorrect -> 0xac6a), seq 292:355, ack 975, win 2049, options = [nop,nop,TS val 3640114415 ecr 124116298], length 63 > 01:32:19.135900 IP (tos 0x0, ttl 128, id 22224, offset 0, flags [DF], = proto TCP (6), length 1500) > 192.168.33.200.389 > 192.168.33.89.62284: Flags [.], cksum 0x5ffb = (correct), seq 975:2423, ack 355, win 258, options [nop,nop,TS val = 124116298 ecr 3640114415], length 1448 > 01:32:19.135913 IP (tos 0x0, ttl 128, id 22225, offset 0, flags [DF], = proto TCP (6), length 299) > 192.168.33.200.389 > 192.168.33.89.62284: Flags [P.], cksum 0x7cb3 = (correct), seq 2423:2670, ack 355, win 258, options [nop,nop,TS val = 124116298 ecr 3640114415], length 247 > 01:32:19.135935 IP (tos 0x0, ttl 128, id 32903, offset 0, flags = [none], proto TCP (6), length 52) > 192.168.33.89.62284 > 192.168.33.200.389: Flags [.], cksum 0xc498 = (incorrect -> 0x0530), seq 355, ack 2670, win 2048, options [nop,nop,TS = val 3640114415 ecr 124116298], length 0 > 01:32:19.139239 IP (tos 0x0, ttl 128, id 64896, offset 0, flags = [none], proto TCP (6), length 148) > 192.168.33.89.62284 > 192.168.33.200.389: Flags [P.], cksum 0xc4f8 = (incorrect -> 0xd163), seq 355:451, ack 2670, win 2049, options = [nop,nop,TS val 3640114425 ecr 124116298], length 96 > 01:32:19.139753 IP (tos 0x0, ttl 128, id 22226, offset 0, flags [DF], = proto TCP (6), length 1218) > 192.168.33.200.389 > 192.168.33.89.62284: Flags [P.], cksum 0x1c85 = (correct), seq 2670:3836, ack 451, win 258, options [nop,nop,TS val = 124116298 ecr 3640114425], length 1166 > 01:32:19.141672 IP (tos 0x0, ttl 128, id 37692, offset 0, flags = [none], proto TCP (6), length 59) > 192.168.33.89.62284 > 192.168.33.200.389: Flags [P.], cksum 0xc49f = (incorrect -> 0xaddf), seq 451:458, ack 3836, win 2049, options = [nop,nop,TS val 3640114425 ecr 124116298], length 7 > 01:32:19.141924 IP (tos 0x0, ttl 128, id 22227, offset 0, flags [DF], = proto TCP (6), length 40) > 192.168.33.200.389 > 192.168.33.89.62284: Flags [R.], cksum 0xbbe5 = (correct), seq 3836, ack 458, win 0, length 0 > 01:32:19.408167 IP (tos 0x0, ttl 128, id 51302, offset 0, flags = [none], proto TCP (6), length 59) > 192.168.33.89.62284 > 192.168.33.200.389: Flags [P.], cksum 0xc49f = (incorrect -> 0xacd0), seq 451:458, ack 3836, win 2049, options = [nop,nop,TS val 3640114696 ecr 124116298], length 7 > 01:32:19.408464 IP (tos 0x0, ttl 128, id 22241, offset 0, flags [DF], = proto TCP (6), length 40) > 192.168.33.200.389 > 192.168.33.89.62284: Flags [R], cksum 0xdf3b = (correct), seq 1489253100, win 0, length 0 > 01:32:19.748075 IP (tos 0x0, ttl 128, id 56645, offset 0, flags = [none], proto TCP (6), length 59) > 192.168.33.89.62284 > 192.168.33.200.389: Flags [P.], cksum 0xc49f = (incorrect -> 0xab7c), seq 451:458, ack 3836, win 2049, options = [nop,nop,TS val 3640115036 ecr 124116298], length 7 > 01:32:19.748381 IP (tos 0x0, ttl 128, id 22244, offset 0, flags [DF], = proto TCP (6), length 40) > 192.168.33.200.389 > 192.168.33.89.62284: Flags [R], cksum 0xdf3b = (correct), seq 1489253100, win 0, length 0 > 01:32:20.228076 IP (tos 0x0, ttl 128, id 16474, offset 0, flags = [none], proto TCP (6), length 59) > 192.168.33.89.62284 > 192.168.33.200.389: Flags [P.], cksum 0xc49f = (incorrect -> 0xa99c), seq 451:458, ack 3836, win 2049, options = [nop,nop,TS val 3640115516 ecr 124116298], length 7 > 01:32:20.228470 IP (tos 0x0, ttl 128, id 22247, offset 0, flags [DF], = proto TCP (6), length 40) > 192.168.33.200.389 > 192.168.33.89.62284: Flags [R], cksum 0xdf3b = (correct), seq 1489253100, win 0, length 0 > 01:32:20.988094 IP (tos 0x0, ttl 128, id 51707, offset 0, flags = [none], proto TCP (6), length 59) > 192.168.33.89.62284 > 192.168.33.200.389: Flags [P.], cksum 0xc49f = (incorrect -> 0xa6a4), seq 451:458, ack 3836, win 2049, options = [nop,nop,TS val 3640116276 ecr 124116298], length 7 > 01:32:20.988405 IP (tos 0x0, ttl 128, id 22250, offset 0, flags [DF], = proto TCP (6), length 40) > 192.168.33.200.389 > 192.168.33.89.62284: Flags [R], cksum 0xdf3b = (correct), seq 1489253100, win 0, length 0 > 01:32:22.308132 IP (tos 0x0, ttl 128, id 29337, offset 0, flags = [none], proto TCP (6), length 59) > 192.168.33.89.62284 > 192.168.33.200.389: Flags [P.], cksum 0xc49f = (incorrect -> 0xa17c), seq 451:458, ack 3836, win 2049, options = [nop,nop,TS val 3640117596 ecr 124116298], length 7 > 01:32:22.308280 IP (tos 0x0, ttl 128, id 22340, offset 0, flags [DF], = proto TCP (6), length 40) > 192.168.33.200.389 > 192.168.33.89.62284: Flags [R], cksum 0xdf3b = (correct), seq 1489253100, win 0, length 0 > 01:32:24.748054 IP (tos 0x0, ttl 128, id 14340, offset 0, flags = [none], proto TCP (6), length 59) > 192.168.33.89.62284 > 192.168.33.200.389: Flags [P.], cksum 0xc49f = (incorrect -> 0x97f4), seq 451:458, ack 3836, win 2049, options = [nop,nop,TS val 3640120036 ecr 124116298], length 7 > 01:32:24.748345 IP (tos 0x0, ttl 128, id 22370, offset 0, flags [DF], = proto TCP (6), length 40) > 192.168.33.200.389 > 192.168.33.89.62284: Flags [R], cksum 0xdf3b = (correct), seq 1489253100, win 0, length 0 > 01:32:29.428068 IP (tos 0x0, ttl 128, id 33249, offset 0, flags = [none], proto TCP (6), length 59) > 192.168.33.89.62284 > 192.168.33.200.389: Flags [P.], cksum 0xc49f = (incorrect -> 0x85ac), seq 451:458, ack 3836, win 2049, options = [nop,nop,TS val 3640124716 ecr 124116298], length 7 > 01:32:29.428395 IP (tos 0x0, ttl 128, id 22375, offset 0, flags [DF], = proto TCP (6), length 40) > 192.168.33.200.389 > 192.168.33.89.62284: Flags [R], cksum 0xdf3b = (correct), seq 1489253100, win 0, length 0 > 01:32:38.588058 IP (tos 0x0, ttl 128, id 30609, offset 0, flags = [none], proto TCP (6), length 59) > 192.168.33.89.62284 > 192.168.33.200.389: Flags [P.], cksum 0xc49f = (incorrect -> 0x61e4), seq 451:458, ack 3836, win 2049, options = [nop,nop,TS val 3640133876 ecr 124116298], length 7 > 01:32:38.588490 IP (tos 0x0, ttl 128, id 22377, offset 0, flags [DF], = proto TCP (6), length 40) > 192.168.33.200.389 > 192.168.33.89.62284: Flags [R], cksum 0xdf3b = (correct), seq 1489253100, win 0, length 0 > 01:32:56.708045 IP (tos 0x0, ttl 128, id 37650, offset 0, flags = [none], proto TCP (6), length 59) > 192.168.33.89.62284 > 192.168.33.200.389: Flags [P.], cksum 0xc49f = (incorrect -> 0x1b1c), seq 451:458, ack 3836, win 2049, options = [nop,nop,TS val 3640151996 ecr 124116298], length 7 > 01:32:56.708403 IP (tos 0x0, ttl 128, id 22381, offset 0, flags [DF], = proto TCP (6), length 40) > 192.168.33.200.389 > 192.168.33.89.62284: Flags [R], cksum 0xdf3b = (correct), seq 1489253100, win 0, length 0 > 01:33:26.829653 IP (tos 0x0, ttl 128, id 6370, offset 0, flags [none], = proto TCP (6), length 86) > 192.168.33.89.62284 > 192.168.33.200.389: Flags [P.], cksum 0xc4ba = (incorrect -> 0xc579), seq 458:492, ack 3836, win 2049, options = [nop,nop,TS val 3640182115 ecr 124116298], length 34 > 01:33:26.829919 IP (tos 0x0, ttl 128, id 22406, offset 0, flags [DF], = proto TCP (6), length 40) > 192.168.33.200.389 > 192.168.33.89.62284: Flags [R], cksum 0xdf3b = (correct), seq 1489253100, win 0, length 0 > 01:33:32.748171 IP (tos 0x0, ttl 128, id 54306, offset 0, flags = [none], proto TCP (6), length 93) > 192.168.33.89.62284 > 192.168.33.200.389: Flags [P.], cksum 0xc4c1 = (incorrect -> 0x6cff), seq 451:492, ack 3836, win 2049, options = [nop,nop,TS val 3640188036 ecr 124116298], length 41 > 01:33:32.748576 IP (tos 0x0, ttl 128, id 22407, offset 0, flags [DF], = proto TCP (6), length 40) > 192.168.33.200.389 > 192.168.33.89.62284: Flags [R], cksum 0xdf3b = (correct), seq 1489253100, win 0, length 0 > 01:34:08.788230 IP (tos 0x0, ttl 128, id 31457, offset 0, flags = [none], proto TCP (6), length 93) > 192.168.33.89.62284 > 192.168.33.200.389: Flags [P.], cksum 0xc4c1 = (incorrect -> 0xe036), seq 451:492, ack 3836, win 2049, options = [nop,nop,TS val 3640224076 ecr 124116298], length 41 > 01:34:08.788496 IP (tos 0x0, ttl 128, id 22427, offset 0, flags [DF], = proto TCP (6), length 40) > 192.168.33.200.389 > 192.168.33.89.62284: Flags [R], cksum 0xdf3b = (correct), seq 1489253100, win 0, length 0 > 01:34:44.828060 IP (tos 0x0, ttl 128, id 8424, offset 0, flags [none], = proto TCP (6), length 93) > 192.168.33.89.62284 > 192.168.33.200.389: Flags [P.], cksum 0xc4c1 = (incorrect -> 0x536e), seq 451:492, ack 3836, win 2049, options = [nop,nop,TS val 3640260116 ecr 124116298], length 41 > 01:34:44.828384 IP (tos 0x0, ttl 128, id 22429, offset 0, flags [DF], = proto TCP (6), length 40) > 192.168.33.200.389 > 192.168.33.89.62284: Flags [R], cksum 0xdf3b = (correct), seq 1489253100, win 0, length 0 > 01:35:20.868093 IP (tos 0x0, ttl 128, id 1379, offset 0, flags [none], = proto TCP (6), length 52) > 192.168.33.89.62284 > 192.168.33.200.389: Flags [R.], cksum 0xc498 = (incorrect -> 0x4225), seq 492, ack 3836, win 0, options [nop,nop,TS val = 3640296156 ecr 124116298], length 0 >=20 >=20 >=20