mirror_frr/tests
Philippe Guibert 188ba91082 bgpd, topotests: bmp, fix wrong peer type for peer up/down events
When running the bgp_bmp_2 vrf test, peer up/down events from the pre
and post policy are received with a wrong peer type value

> {"peer_type": "global instance", "policy": "pre-policy", "ipv6": false,
> "peer_ip": "192.168.0.2", "peer_distinguisher": "0:0", "peer_asn": 65502,
> "peer_bgp_id": "192.168.0.2", "timestamp": "2024-10-16 21:59:53.111962",
> "bmp_log_type": "peer up", "local_ip": "192.168.0.1", "local_port": 179,
> "remote_port": 50710, "seq": 4}

RFC7854 defines RD instance peer type, and later in 4.2 requests that
the peer distinguisher value be set to non zero value when the peer type
is not global. This is the case for peer vrf instances.

Fix this by modifying the BMP client, update the peer type
value by updating the peer type value when sending peer up/down messages.

Add a check in the bgp_bmp_2 test to ensure that peer type is correctly
set.

> {"peer_type": "route distinguisher instance", "policy": "pre-policy",
> "ipv6": true, "peer_ip": "192:168::2", "peer_distinguisher": "0:0",
> "peer_asn": 65502, "peer_bgp_id": "192.168.0.2", "timestamp":
> "2024-10-16 21:59:53.111962", "bmp_log_type": "peer up", "local_ip":
> "192:168::1", "local_port": 179, "remote_port": 50836, "seq": 5}

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-11 11:47:56 +01:00
..
bgpd lib: add flag to have libyang load internal ietf-yang-library module 2024-10-07 03:32:44 +00:00
helpers tests: remove strncpy() use 2024-10-22 14:51:25 +02:00
isisd Merge pull request #17156 from opensourcerouting/eradicate-strncpy 2024-11-19 09:42:39 -05:00
lib lib: Fix Lua script unit test 2024-11-18 17:25:08 +02:00
ospf6d ospf6d: move lsa structs to ospf6_lsa.h 2024-09-16 18:38:16 +10:00
ospfd *: remove sys/stat.h from zebra.h 2024-01-09 12:39:23 -05:00
topotests bgpd, topotests: bmp, fix wrong peer type for peer up/down events 2024-12-11 11:47:56 +01:00
zebra zebra, test: mark mpls label chunks as dynamic or static 2023-10-18 09:41:02 +02:00
.gitignore tests: Ignore test_darr for git 2023-07-08 22:41:34 +03:00
Makefile
pytest.ini
runtests.py
subdir.am build: break up tests/subdir.am 2021-11-11 14:40:03 +01:00