summaryrefslogtreecommitdiffstats
path: root/tests/py/inet/tproxy.t.payload
blob: 24bf8f6002f8fb815212b226f83e36ad250fd1e2 (plain)
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
# meta l4proto 17 tproxy ip to 192.0.2.1
inet x y 
  [ meta load l4proto => reg 1 ]
  [ cmp eq reg 1 0x00000011 ]
  [ immediate reg 1 0x010200c0 ]
  [ tproxy ip addr reg 1 ]

# meta l4proto 6 tproxy ip to 192.0.2.1:50080
inet x y 
  [ meta load l4proto => reg 1 ]
  [ cmp eq reg 1 0x00000006 ]
  [ immediate reg 1 0x010200c0 ]
  [ immediate reg 2 0x0000a0c3 ]
  [ tproxy ip addr reg 1 port reg 2 ]

# meta l4proto 6 tproxy ip6 to [2001:db8::1]
inet x y 
  [ meta load l4proto => reg 1 ]
  [ cmp eq reg 1 0x00000006 ]
  [ immediate reg 1 0xb80d0120 0x00000000 0x00000000 0x01000000 ]
  [ tproxy ip6 addr reg 1 ]

# meta l4proto 17 tproxy ip6 to [2001:db8::1]:50080
inet x y 
  [ meta load l4proto => reg 1 ]
  [ cmp eq reg 1 0x00000011 ]
  [ immediate reg 1 0xb80d0120 0x00000000 0x00000000 0x01000000 ]
  [ immediate reg 2 0x0000a0c3 ]
  [ tproxy ip6 addr reg 1 port reg 2 ]

# meta l4proto 17 tproxy to :50080
inet x y 
  [ meta load l4proto => reg 1 ]
  [ cmp eq reg 1 0x00000011 ]
  [ immediate reg 1 0x0000a0c3 ]
  [ tproxy port reg 1 ]

# meta l4proto 17 tproxy ip to :50080
inet x y 
  [ meta load l4proto => reg 1 ]
  [ cmp eq reg 1 0x00000011 ]
  [ immediate reg 1 0x0000a0c3 ]
  [ tproxy ip port reg 1 ]

# meta l4proto 17 tproxy ip6 to :50080
inet x y 
  [ meta load l4proto => reg 1 ]
  [ cmp eq reg 1 0x00000011 ]
  [ immediate reg 1 0x0000a0c3 ]
  [ tproxy ip6 port reg 1 ]

# ip daddr 0.0.0.0/0 meta l4proto 6 tproxy ip to :2000
inet x y 
  [ meta load nfproto => reg 1 ]
  [ cmp eq reg 1 0x00000002 ]
  [ payload load 4b @ network header + 16 => reg 1 ]
  [ bitwise reg 1 = ( reg 1 & 0x00000000 ) ^ 0x00000000 ]
  [ cmp eq reg 1 0x00000000 ]
  [ meta load l4proto => reg 1 ]
  [ cmp eq reg 1 0x00000006 ]
  [ immediate reg 1 0x0000d007 ]
  [ tproxy ip port reg 1 ]