BIRD 3.1.x - "cli v2 attributes" - some attributes not shown in v2 format
Hello, I've enabled cli "/path/to/socket.ctl" { v2 attributes; } for backward compatibility, but it looks like some of the attributes are not displayed in the v2 format: (bgp_community and bgp_large_community) 91.xxx.xxx.xxx/22 unicast [pb_as65001_vli19999_ipv4 2025-09-06 22:35:27] * (100) [AS65002i] via 5.57.82.xx on eth1 Type: BGP univ BGP.origin: IGP BGP.as_path: 65001 65002 BGP.next_hop: 5.57.82.xx BGP.local_pref: 100 bgp_community: (65001,1) (65001,64702) bgp_large_community: (8330, 1000, 1) (8330, 1001, 1) BIRD 2 shows it as: BGP.community: BGP.large_community: I searched the code and it's in https://gitlab.nic.cz/labs/bird/-/blob/v3.1.3/proto/bgp/attrs.c But I don't know any C, and it doesn't look like an "obvious" problem. But this file is more than 3000 lines of code. So I ran away and hid. Rob -- Rob Lister rob@lonap.net +44 20 3137 8330
Hi Rob, On Sun 07 Sep 2025 10:20:50 GMT, Rob Lister wrote:
I searched the code and it's in https://gitlab.nic.cz/labs/bird/-/blob/v3.1.3/proto/bgp/attrs.c
But I don't know any C, and it doesn't look like an "obvious" problem.
But this file is more than 3000 lines of code. So I ran away and hid.
The attributes are here: https://gitlab.nic.cz/labs/bird/-/blob/v3.1.3/lib/attrs.h -- Alarig
Hi Rob, Try the attached patch. Regards, Alexander On Sun, Sep 7, 2025 at 11:29 AM Rob Lister <rob@lonap.net> wrote:
Hello,
I've enabled cli "/path/to/socket.ctl" { v2 attributes; } for backward compatibility, but it looks like some of the attributes are not displayed in the v2 format:
(bgp_community and bgp_large_community)
91.xxx.xxx.xxx/22 unicast [pb_as65001_vli19999_ipv4 2025-09-06 22:35:27] * (100) [AS65002i] via 5.57.82.xx on eth1 Type: BGP univ BGP.origin: IGP BGP.as_path: 65001 65002 BGP.next_hop: 5.57.82.xx BGP.local_pref: 100 bgp_community: (65001,1) (65001,64702) bgp_large_community: (8330, 1000, 1) (8330, 1001, 1)
BIRD 2 shows it as:
BGP.community: BGP.large_community:
I searched the code and it's in https://gitlab.nic.cz/labs/bird/-/blob/v3.1.3/proto/bgp/attrs.c
But I don't know any C, and it doesn't look like an "obvious" problem.
But this file is more than 3000 lines of code. So I ran away and hid.
Rob
-- Rob Lister rob@lonap.net +44 20 3137 8330
Hi Alexander, Thanks for that. I've applied your patch to a locally-built v3.1.3. I can confirm it fixes this issue (at least for bgp_community and bgp_large_community). I don't have a lot of prefixes right now to test if it affects other attributes which don't currently show up. Rob On 2025-09-07 11:49, Alexander Zubkov wrote:
Hi Rob,
Try the attached patch.
Regards, Alexander
-- Rob Lister rob@lonap.net +44 20 3137 8330
Hi Rob, Thanks for confirming. It looks like a simple overlook, and a fix is quite straightforward. I hope it will be applied to the mainstream soon. Regards, Alexander On Mon, Sep 8, 2025 at 11:54 AM Rob Lister <rob@lonap.net> wrote:
Hi Alexander,
Thanks for that. I've applied your patch to a locally-built v3.1.3.
I can confirm it fixes this issue (at least for bgp_community and bgp_large_community).
I don't have a lot of prefixes right now to test if it affects other attributes which don't currently show up.
Rob
On 2025-09-07 11:49, Alexander Zubkov wrote:
Hi Rob,
Try the attached patch.
Regards, Alexander
-- Rob Lister rob@lonap.net +44 20 3137 8330
On Wed, Sep 17, 2025 at 03:44:23PM +0200, Alexander Zubkov via Bird-users wrote:
Hi Rob,
Thanks for confirming. It looks like a simple overlook, and a fix is quite straightforward. I hope it will be applied to the mainstream soon.
Hi Thanks, merged: https://gitlab.nic.cz/labs/bird/-/commit/47f580202a6744ff27f228d8fe66f213cf5... -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) "To err is human -- to blame it on a computer is even more so."
participants (4)
-
Alarig Le Lay -
Alexander Zubkov -
Ondrej Zajicek -
Rob Lister