mirror_frr/tests
Philippe Guibert a04f1c42eb bgpd: imported vpn entries get appropriate distance
MPLS VPN networks can either peer with iBGP or eBGP. When
calculating the distance to send to zebra, the imported prefix
is never sent with distance information, even if the vty
command is used under the ipv4 unicast address family:

router bgp 65505 vrf vrf1
 address-family ipv4 unicast
  distance bgp 26 27 28
  [vpn config]

The observation is that the distance sent to zebra for an
imported prefix is still 20:

[..]
VRF vrf1:
B>  192.168.0.0/24 [20/0] via 2.2.2.2 (vrf default) (recursive), label 20, weight 1, 00:00:12
  *                          via 10.125.0.6, ntfp3 (vrf default), label implicit-null/20, weight 1, 00:00:12

The expectation is that the incoming prefix has to follow the
distance that is configured, or the distance derived from the peer
relationship established by the parent prefix.

In the case, an iBGP relationship is done, and no distance
configuration is done, the below show is expected:

   [..]
   VRF vrf1:
   B*>  192.168.0.0/24 [200/0] via 192.168.0.2, r1-gre0 (vrf default), label 20, weight 1, 00:00:12

In the case an iBGP relationship is done, and distance configuration
is performed as below:
   [..]
   distance bgp 21 201 41
   [..]

Then the below show is expected:

   [..]
   VRF vrf1:
   B*>  192.168.0.0/24 [201/0] via 192.168.0.2, r1-gre0 (vrf default), label 20, weight 1, 00:00:12

To get this behaviour, get the peer origin where the prefix is coming
from.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-01-17 13:24:33 +01:00
..
bgpd bgpd: Add RFC9234 implementation 2022-06-17 13:14:46 +03:00
helpers *: Change thread->func to return void instead of int 2022-02-23 19:56:04 -05:00
isisd isisd: fix metric calculation of classic lfa backup prefixes 2022-10-24 14:56:42 +02:00
lib lib, tests, zebra: Remove unused workqueue error function 2022-12-15 11:15:33 -05:00
ospf6d build: break up tests/subdir.am 2021-11-11 14:40:03 +01:00
ospfd ospfd: add all_rtrs route table when opaque enabled 2022-06-02 16:37:16 -04:00
topotests bgpd: imported vpn entries get appropriate distance 2023-01-17 13:24:33 +01:00
zebra build: break up tests/subdir.am 2021-11-11 14:40:03 +01:00
.gitignore tests: new grpc topotest 2022-03-14 11:14:12 -04:00
Makefile
pytest.ini
runtests.py *: reformat python files 2020-10-07 17:22:26 -04:00
subdir.am build: break up tests/subdir.am 2021-11-11 14:40:03 +01:00