diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-11-10 02:06:07 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-11-10 02:06:07 +0100 |
commit | 0b228fca04c8a9a81af6a4973877ceba9aede3f0 (patch) | |
tree | ae5a7e9a1c8d4c6adc86db1d543a2befbcfa3a63 /proto/bgp/bgp.c | |
parent | becda5638a8ff8b056ec04b5e156e86b168cb9ef (diff) |
BGP: Add option to enforce first AS in AS_PATH
This is optional check described in RFC 4271. Although this can be also
done by filters, it is widely implemented option in BGP implementations.
Thanks to Eugene Bogomazov for the original patch.
Diffstat (limited to 'proto/bgp/bgp.c')
-rw-r--r-- | proto/bgp/bgp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index 053016dd..2a64958a 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -1936,6 +1936,9 @@ bgp_postconfig(struct proto_config *CF) if (!cf->gr_mode && cf->llgr_mode) cf_error("Long-lived graceful restart requires basic graceful restart"); + if (internal && cf->enforce_first_as) + cf_error("Enforce first AS check is requires EBGP sessions"); + struct bgp_channel_config *cc; WALK_LIST(cc, CF->channels) |