diff options
author | Vincent Bernat <vincent@bernat.ch> | 2021-02-10 16:53:57 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2021-02-10 16:53:57 +0100 |
commit | 714238716ef36f1dfc5721055e2ec4affd42ebfa (patch) | |
tree | 50564bd78326443e2376f2095251b6b1c0871afc /proto/bgp/config.Y | |
parent | 00b85905b9f5081eb2fce0ed79542085278e9f42 (diff) |
BGP: Add support for BGP hostname capability
This is an implementation of draft-walton-bgp-hostname-capability-02.
It is implemented since quite some time for FRR and in datacenter, this
gives a nice output to avoid using IP addresses.
It is disabled by default. The hostname is retrieved from uname(2) and
can be overriden with "hostname" option. The domain name is never set
nor displayed.
Minor changes by committer.
Diffstat (limited to 'proto/bgp/config.Y')
-rw-r--r-- | proto/bgp/config.Y | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/proto/bgp/config.Y b/proto/bgp/config.Y index 18c3560d..2dfbdca9 100644 --- a/proto/bgp/config.Y +++ b/proto/bgp/config.Y @@ -62,6 +62,7 @@ bgp_proto_start: proto_start BGP { BGP_CFG->error_delay_time_max = 300; BGP_CFG->enable_refresh = 1; BGP_CFG->enable_as4 = 1; + BGP_CFG->enable_hostname = 0; BGP_CFG->capabilities = 2; BGP_CFG->interpret_communities = 1; BGP_CFG->allow_as_sets = 1; @@ -173,6 +174,7 @@ bgp_proto: | bgp_proto ENABLE ROUTE REFRESH bool ';' { BGP_CFG->enable_refresh = $5; } | bgp_proto ENABLE AS4 bool ';' { BGP_CFG->enable_as4 = $4; } | bgp_proto ENABLE EXTENDED MESSAGES bool ';' { BGP_CFG->enable_extended_messages = $5; } + | bgp_proto ADVERTISE HOSTNAME bool ';' { BGP_CFG->enable_hostname = $4; } | bgp_proto CAPABILITIES bool ';' { BGP_CFG->capabilities = $3; } | bgp_proto PASSWORD text ';' { BGP_CFG->password = $3; } | bgp_proto SETKEY bool ';' { BGP_CFG->setkey = $3; } |