summaryrefslogtreecommitdiffstats
path: root/tests/py/ip/meta.t.payload
blob: 7bc69a290d24e59ca37f898f6dd4551adb6eff13 (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
# icmp type echo-request
ip test-ip4 input
  [ meta load l4proto => reg 1 ]
  [ cmp eq reg 1 0x00000001 ]
  [ payload load 1b @ transport header + 0 => reg 1 ]
  [ cmp eq reg 1 0x00000008 ]

# meta l4proto icmp icmp type echo-request
ip test-ip4 input
  [ meta load l4proto => reg 1 ]
  [ cmp eq reg 1 0x00000001 ]
  [ payload load 1b @ transport header + 0 => reg 1 ]
  [ cmp eq reg 1 0x00000008 ]

# meta l4proto ipv6-icmp icmpv6 type nd-router-advert
ip test-ip4 input
  [ meta load l4proto => reg 1 ]
  [ cmp eq reg 1 0x0000003a ]
  [ payload load 1b @ transport header + 0 => reg 1 ]
  [ cmp eq reg 1 0x00000086 ]

# meta l4proto 58 icmpv6 type nd-router-advert
ip test-ip4 input
  [ meta load l4proto => reg 1 ]
  [ cmp eq reg 1 0x0000003a ]
  [ payload load 1b @ transport header + 0 => reg 1 ]
  [ cmp eq reg 1 0x00000086 ]

# icmpv6 type nd-router-advert
ip test-ip4 input
  [ meta load l4proto => reg 1 ]
  [ cmp eq reg 1 0x0000003a ]
  [ payload load 1b @ transport header + 0 => reg 1 ]
  [ cmp eq reg 1 0x00000086 ]

# meta sdif "lo" accept
ip6 test-ip4 input
  [ meta load sdif => reg 1 ]
  [ cmp eq reg 1 0x00000001 ]
  [ immediate reg 0 accept ]

# meta sdifname != "vrf1" accept
ip6 test-ip4 input
  [ meta load sdifname => reg 1 ]
  [ cmp neq reg 1 0x31667276 0x00000000 0x00000000 0x00000000 ]
  [ immediate reg 0 accept ]