summaryrefslogtreecommitdiffstats
path: root/tests/py/ip/tproxy.t.payload
blob: dfe830ec3715274fd58091bff89746d2f3ff0ae3 (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
# meta l4proto 17 tproxy to 192.0.2.1
ip 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 to 192.0.2.1:50080
ip 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 ]

# ip protocol 6 tproxy to :50080
ip x y 
  [ payload load 1b @ network header + 9 => reg 1 ]
  [ cmp eq reg 1 0x00000006 ]
  [ immediate reg 1 0x0000a0c3 ]
  [ tproxy ip port reg 1 ]

# meta l4proto 17 tproxy ip to 192.0.2.1
ip 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
ip 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 ]

# ip protocol 6 tproxy ip to :50080
ip x y 
  [ payload load 1b @ network header + 9 => reg 1 ]
  [ cmp eq reg 1 0x00000006 ]
  [ immediate reg 1 0x0000a0c3 ]
  [ tproxy ip port reg 1 ]