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/bgp.c | |
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/bgp.c')
-rw-r--r-- | proto/bgp/bgp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index 302d026c..c54afe06 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -103,6 +103,7 @@ * RFC 8654 - Extended Message Support for BGP * draft-ietf-idr-ext-opt-param-07 * draft-uttaro-idr-bgp-persistence-04 + * draft-walton-bgp-hostname-capability-02 */ #undef LOCAL_DEBUG @@ -2415,6 +2416,9 @@ bgp_show_capabilities(struct bgp_proto *p UNUSED, struct bgp_caps *caps) bgp_show_afis(-1006, " AF supported:", afl1, afn1); bgp_show_afis(-1006, " AF preserved:", afl2, afn2); } + + if (caps->hostname) + cli_msg(-1006, " Hostname: %s", caps->hostname); } static void |