Commit 07daa3e
committed
bgpd, topotests: fix validate imported routes only in 'import vrf' cases
The bgp_vpnv4_gre test validates imported routes as ok when route-map is
detached. Whereas, The nexthop of MPLS paths must either be a labelled
nexthop or point to a GRE interface (by using route-map).
The case where this check does not matter is when local importation is
performed by using the 'import vrf' command. Fix this by applying the
automatic validation only when this command is used to import VPN paths.
Enforce the current topotest by really checking the invalidity of the path.
Apply black style to modified topotest.
Fixes: bgpd: ("Validate imported routes next-hop that is in a default VRF")
Signed-off-by: Philippe Guibert <[email protected]>1 parent 872ed46 commit 07daa3e
File tree
2 files changed
+32
-5
lines changed- bgpd
- tests/topotests/bgp_vpnv4_gre
2 files changed
+32
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
480 | 480 | | |
481 | 481 | | |
482 | 482 | | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
483 | 491 | | |
484 | 492 | | |
485 | 493 | | |
486 | 494 | | |
487 | 495 | | |
488 | | - | |
489 | | - | |
490 | 496 | | |
491 | 497 | | |
492 | 498 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
109 | 123 | | |
110 | 124 | | |
111 | 125 | | |
| |||
148 | 162 | | |
149 | 163 | | |
150 | 164 | | |
151 | | - | |
| 165 | + | |
152 | 166 | | |
153 | 167 | | |
154 | 168 | | |
| |||
166 | 180 | | |
167 | 181 | | |
168 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
169 | 190 | | |
170 | 191 | | |
171 | 192 | | |
| |||
0 commit comments