if (_receiver.ackno().has_value() and (seg.length_in_sequence_space() == 0) and seg.header().seqno == _receiver.ackno().value() - 1) { _sender.send_empty_segment(); }
TCPSegment seg = test_2.expect_seg(ExpectOneSegment{}.with_syn(true).with_ack(false), "test 2 failed: could not parse SYN segment or invalid flags"); auto &seg_hdr = seg.header();
test_2.execute(ExpectState{State::SYN_SENT});
// send SYN (no ACK yet) const WrappingInt32 isn(rd()); test_2.send_syn(isn); test_2.execute(Tick(1));
test_2.expect_seg(ExpectOneSegment{}.with_syn(false).with_ack(true).with_ackno(isn + 1), "test 2 failed: bad ACK for SYN");
test_2.execute(ExpectState{State::SYN_RCVD});
调试tun144/145
本地tun144/tun145两张网卡无法通信。tun145发的包tun144收不到
1 2 3 4 5 6 7 8 9 10 11 12 13 14
$ ip a ... 49: tun144: <NO-CARRIER,POINTOPOINT,MULTICAST,NOARP,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 500 link/none inet 169.254.144.1/24 scope global tun144 valid_lft forever preferred_lft forever inet6 fe80::40ad:1e69:28e2:988c/64 scope link stable-privacy valid_lft forever preferred_lft forever 50: tun145: <NO-CARRIER,POINTOPOINT,MULTICAST,NOARP,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 500 link/none inet 169.254.145.1/24 scope global tun145 valid_lft forever preferred_lft forever inet6 fe80::8e6c:7fed:e456:8f35/64 scope link stable-privacy valid_lft forever preferred_lft forever
1 2 3 4 5 6 7 8 9
$ ip r default via 10.19.0.254 dev eno1 proto static metric 100 default via 10.30.0.254 dev eno3 proto static metric 20102 10.19.0.0/24 dev eno1 proto kernel scope link src 10.19.0.36 metric 100 10.30.0.0/19 dev eno3 proto kernel scope link src 10.30.19.36 metric 102 169.254.0.0/16 dev tun144 scope link metric 1000 linkdown 169.254.144.0/24 dev tun144 scope link linkdown rto_min lock 10ms 169.254.145.0/24 dev tun145 scope link linkdown rto_min lock 10ms 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1