summaryrefslogtreecommitdiffstats
path: root/tests/py/inet/fib.t.payload
blob: 050857d96994ed923b51cd8fccd6bd25e8898c11 (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
# fib saddr . iif oif ne 0
ip test-ip prerouting
  [ fib saddr . iif oif => reg 1 ]
  [ cmp neq reg 1 0x00000000 ]

# fib saddr . iif oifname "lo"
ip test-ip prerouting
  [ fib saddr . iif oifname => reg 1 ]
  [ cmp eq reg 1 0x00006f6c 0x00000000 0x00000000 0x00000000 ]

# fib daddr . iif type local
ip test-ip prerouting
  [ fib daddr . iif type => reg 1 ]
  [ cmp eq reg 1 0x00000002 ]

# fib daddr . iif type vmap { blackhole : drop, prohibit : drop, unicast : accept }
__map%d test-ip b
__map%d test-ip 0
	element 00000006  : drop 0 [end]	element 00000008  : drop 0 [end]	element 00000001  : accept 0 [end]
ip test-ip prerouting
  [ fib daddr . iif type => reg 1 ]
  [ lookup reg 1 set __map%d dreg 0 ]

# fib daddr oif exists
ip test-ip prerouting
  [ fib daddr oif present => reg 1 ]
  [ cmp eq reg 1 0x00000001 ]

# fib daddr oif missing
ip test-ip prerouting
  [ fib daddr oif present => reg 1 ]
  [ cmp eq reg 1 0x00000000 ]