| // SPDX-License-Identifier: GPL-2.0 |
| // Verify that setsockopt calls that force a route refresh do not |
| // cause problems matching SACKs with packets in the write queue. |
| // This variant tests IP_TOS. |
| |
| `./defaults.sh` |
| |
| // Establish a connection. |
| 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 |
| +0 setsockopt(3, SOL_IP, IP_MTU_DISCOVER, [IP_PMTUDISC_DONT], 1) = 0 |
| +0...0.010 connect(3, ..., ...) = 0 |
| |
| +0 > S 0:0(0) <mss 1460,sackOK,TS val 100 ecr 0,nop,wscale 8> |
| +.01 < S. 0:0(0) ack 1 win 65535 <mss 1460,nop,wscale 2,nop,nop,sackOK> |
| +0 > . 1:1(0) ack 1 |
| |
| +.01 write(3, ..., 5840) = 5840 |
| +0 > P. 1:5841(5840) ack 1 |
| +.01 < . 1:1(0) ack 5841 win 65535 |
| |
| +.01 write(3, ..., 5840) = 5840 |
| +0 > P. 5841:11681(5840) ack 1 |
| +.01 < . 1:1(0) ack 11681 win 65535 |
| |
| +.01 write(3, ..., 14600) = 14600 |
| +0 > P. 11681:26281(14600) ack 1 |
| |
| // Try the socket option that we know can force a route refresh. |
| +0 setsockopt(3, SOL_IP, IP_TOS, [4], 1) = 0 |
| // Then revert to avoid routing/mangling/etc implications of that setting. |
| +0 setsockopt(3, SOL_IP, IP_TOS, [0], 1) = 0 |
| |
| // Verify that we do not retransmit the SACKed segments. |
| +.01 < . 1:1(0) ack 13141 win 65535 <sack 16061:17521 20441:26281,nop,nop> |
| +0 > . 13141:16061(2920) ack 1 |
| +0 > P. 17521:20441(2920) ack 1 |
| +.01 < . 1:1(0) ack 26281 win 65535 |