Page MenuHomeVyOS Platform

BGP config fails when route-reflector-client is configured and peer-group is not used
Closed, ResolvedPublicBUG

Description

Valid 1.4.0:

set protocols bgp system-as '65550'
...
set protocols bgp neighbor 198.51.100.99 address-family ipv4-unicast route-reflector-client
set protocols bgp neighbor 198.51.100.99 address-family ipv4-unicast soft-reconfiguration inbound
set protocols bgp neighbor 198.51.100.99 address-family ipv4-unicast weight '32769'
set protocols bgp neighbor 198.51.100.99 description 'TEST'
set protocols bgp neighbor 198.51.100.99 remote-as '65550'

Error printed while trying it in 1.4.3:

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/protocols_bgp.py", line 666, in <module>
    verify(c)
  File "/usr/libexec/vyos/conf_mode/protocols_bgp.py", line 480, in verify
    if peer_group_as is None or (peer_group_as != 'internal' and peer_group_as != bgp['system_as']):
       ^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'peer_group_as' where it is not associated with a value

Details

Version
1.4.3
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

This appears to be a logical bug. I have opened a Pull Request to fix it.
https://github.com/vyos/vyos-1x/pull/4663

Unknown Object (User) closed this task as Resolved.Sep 9 2025, 3:13 PM
dmbaturin changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.