diff options
author | Pascal Mathis <mail@pascalmathis.com> | 2018-05-17 22:51:35 +0200 |
---|---|---|
committer | Pascal Mathis <mail@pascalmathis.com> | 2018-05-19 14:43:42 +0200 |
commit | 47cbc09b639026bcda9d03bc7fb5e48d87aee6c8 (patch) | |
tree | fb8748894bfb5afd2666646be0642ab0275c68a0 /bgpd/bgpd.h | |
parent | Merge pull request #2198 from LabNConsulting/working/master/bgpd-nht-crash (diff) | |
download | frr-47cbc09b639026bcda9d03bc7fb5e48d87aee6c8.tar.xz frr-47cbc09b639026bcda9d03bc7fb5e48d87aee6c8.zip |
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>
Diffstat (limited to 'bgpd/bgpd.h')
-rw-r--r-- | bgpd/bgpd.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h index 340851e8d..0c6bfcdc3 100644 --- a/bgpd/bgpd.h +++ b/bgpd/bgpd.h @@ -826,13 +826,14 @@ struct peer { #define PEER_FLAG_DISABLE_CONNECTED_CHECK (1 << 6) /* disable-connected-check */ #define PEER_FLAG_LOCAL_AS_NO_PREPEND (1 << 7) /* local-as no-prepend */ #define PEER_FLAG_LOCAL_AS_REPLACE_AS (1 << 8) /* local-as no-prepend replace-as */ -#define PEER_FLAG_DELETE (1 << 9) /* mark the peer for deleting */ -#define PEER_FLAG_CONFIG_NODE (1 << 10) /* the node to update configs on */ +#define PEER_FLAG_DELETE (1 << 9) /* mark the peer for deleting */ +#define PEER_FLAG_CONFIG_NODE (1 << 10) /* the node to update configs on */ #define PEER_FLAG_LONESOUL (1 << 11) #define PEER_FLAG_DYNAMIC_NEIGHBOR (1 << 12) /* dynamic neighbor */ #define PEER_FLAG_CAPABILITY_ENHE (1 << 13) /* Extended next-hop (rfc 5549)*/ #define PEER_FLAG_IFPEER_V6ONLY (1 << 14) /* if-based peer is v6 only */ -#define PEER_FLAG_IS_RFAPI_HD (1 << 15) /* attached to rfapi HD */ +#define PEER_FLAG_IS_RFAPI_HD (1 << 15) /* attached to rfapi HD */ +#define PEER_FLAG_ENFORCE_FIRST_AS (1 << 16) /* enforce-first-as */ /* outgoing message sent in CEASE_ADMIN_SHUTDOWN notify */ char *tx_shutdown_message; |