]> git.proxmox.com Git - mirror_frr.git/commit - bgpd/bgp_attr.c
bgpd: Move 'enforce-first-as' from global to peer
authorPascal Mathis <mail@pascalmathis.com>
Thu, 17 May 2018 20:51:35 +0000 (22:51 +0200)
committerPascal Mathis <mail@pascalmathis.com>
Sat, 19 May 2018 12:43:42 +0000 (14:43 +0200)
commit47cbc09b639026bcda9d03bc7fb5e48d87aee6c8
treefb8748894bfb5afd2666646be0642ab0275c68a0
parent29be7d92cc65e685bf3e543b1033729fc7b39235
bgpd: Move 'enforce-first-as' from global to peer

This commit moves the command 'bgp enforce-first-as' from global BGP
instance configuration to peer/neighbor configuration, which can now be
changed by executing '[no] neighbor <neighbor> enforce-first-as'.

End users can now enforce sane first-AS checking on regular sessions
while e.g. disabling the checks on routeserver sessions, which usually
strip away their own AS number from the path.

To ensure backwards-compatibility, a migration routine was added which
automatically sets the 'enforce-first-as' flag on all configured
neighbors if the old global setting was activated. The old global
command immediately disappears after running the migration routine once.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
bgpd/bgp_attr.c
bgpd/bgp_vty.c
bgpd/bgpd.c
bgpd/bgpd.h