blob: 8b6759a11c36ce0d9c543e8204c2d3c90a82ed3d (
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
|
# meta nfproto ipv4
ip test-ip4 input
[ meta load nfproto => reg 1 ]
[ cmp eq reg 1 0x00000002 ]
# meta nfproto ipv6
ip test-ip4 input
[ meta load nfproto => reg 1 ]
[ cmp eq reg 1 0x0000000a ]
# meta nfproto {ipv4, ipv6}
__set%d test-ip4 3
__set%d test-ip4 0
element 00000002 : 0 [end] element 0000000a : 0 [end]
ip test-ip4 input
[ meta load nfproto => reg 1 ]
[ lookup reg 1 set __set%d ]
# meta nfproto != {ipv4, ipv6}
__set%d test-ip4 3
__set%d test-ip4 0
element 00000002 : 0 [end] element 0000000a : 0 [end]
ip test-ip4 input
[ meta load nfproto => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
|