-
Notifications
You must be signed in to change notification settings - Fork 0
/
forward-tsn-tlv-too-long.pkt
73 lines (70 loc) · 3.79 KB
/
forward-tsn-tlv-too-long.pkt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//
// Copyright (c) 2016 Julian Cordes
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.
//
--tolerance_usecs=250000
#ifdef FreeBSD
// only enable PR-SCTP extension on FreeBSD
0.0 `sysctl -i net.inet.sctp.ecn_enable=0`
+0.0 `sysctl -i net.inet.sctp.pr_enable=1`
+0.0 `sysctl -i net.inet.sctp.asconf_enable=0`
+0.0 `sysctl -i net.inet.sctp.pktdrop_enable=0`
+0.0 `sysctl -i net.inet.sctp.reconfig_enable=0`
+0.0 `sysctl -i net.inet.sctp.auth_enable=0` // FreeBSD 11 and higher
+0.0 `sysctl -i net.inet.sctp.auth_disable=1` // FreeBSD 9.x and 10.x
+0.0 `sysctl -i net.inet.sctp.nrsack_enable=0` // FreeBSD 11 and higher
+0.0 `sysctl -i net.inet.sctp.nrsack_on_off=0` // FreeBSD 9.x and 10.x
#endif
#ifdef Linux
// only enable PR-SCTP extension on Linux
0.0 `sysctl -ew net.sctp.auth_enable=0`
+0.0 `sysctl -ew net.sctp.prsctp_enable=1`
#endif
+0.0 socket(..., SOCK_STREAM, IPPROTO_SCTP) = 3
+0.0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
+0.0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
+0.0 bind(3, ..., ...) = 0
+0.1 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress)
#ifdef FreeBSD
+0.0 > sctp: INIT[flgs=0, tag=1, a_rwnd=..., os=..., is=..., tsn=1, FORWARD_TSN_SUPPORTED[],
SUPPORTED_EXTENSIONS[types=[FORWARD_TSN]],
SUPPORTED_ADDRESS_TYPES[types=[IPv4]]]
#endif
#ifdef Linux
+0.0 > sctp: INIT[flgs=0, tag=1, a_rwnd=..., os=..., is=..., tsn=1, SUPPORTED_ADDRESS_TYPES[types=[IPv4]],
ECN_CAPABLE[],
FORWARD_TSN_SUPPORTED[]]
#endif
+0.1 < sctp: INIT_ACK[flgs=0, tag=2, a_rwnd=1500, os=16, is=16, tsn=1, STATE_COOKIE[len=4, val=...],
FORWARD_TSN_SUPPORTED[]]
+0.0 > sctp: COOKIE_ECHO[flgs=0, len=4, val=...]
+0.1 < sctp: COOKIE_ACK[flgs=0]
+0.0 getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
// Turn off the sending of HEARTBEATs.
+0.0 setsockopt(3, IPPROTO_SCTP, SCTP_PEER_ADDR_PARAMS, {spp_address=..., spp_hbinterval=0, spp_pathmaxrxt=0, spp_pathmtu=0, spp_flags=SPP_HB_DISABLE|SPP_PMTUD_DISABLE, spp_ipv6_flowlabel=0, spp_dscp=0}, 152) = 0
// send a FORWARD-TSN-Chunk with actual physical length is 8 bytes
// but set the length in the header to 12 bytes (0x0c)
// | new cum_tsn |
+0.0 < sctp: [0xc0, 0x00 ,0x00, 0x0c, 0x00, 0x00,0x00, 0x01]
+0.0 > sctp: ABORT[flgs=0x00, PROTOCOL_VIOLATION[info=...]]