diff options
author | Julien Courtat <julien.courtat@6wind.com> | 2016-05-20 12:10:07 +0200 |
---|---|---|
committer | Philippe Guibert <philippe.guibert@6wind.com> | 2017-01-06 15:08:45 +0100 |
commit | 6a9a3cde582277e37ff024b72b6022efcf1a5884 (patch) | |
tree | 6684939b84b868d36520fcb30d3c509943a19ef7 | |
parent | Merge pull request #43 from pguibert6WIND/frr_6wind_mpbgpgracefulrestart_1 (diff) | |
download | frr-6a9a3cde582277e37ff024b72b6022efcf1a5884.tar.xz frr-6a9a3cde582277e37ff024b72b6022efcf1a5884.zip |
bgpd: enable send of Graceful Restart Preserve State F bit
Enhance struct bgp to add a new flag BGP_FLAG_GR_PRESERVE_FWD, which
allow to set the Preserve State F bit of Graceful Restart capability in
OPEN messages.
Signed-off-by: Julien Courtat <julien.courtat@6wind.com>
-rw-r--r-- | bgpd/bgp_open.c | 5 | ||||
-rw-r--r-- | bgpd/bgpd.h | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c index 4c698562b..af3c0486e 100644 --- a/bgpd/bgp_open.c +++ b/bgpd/bgp_open.c @@ -1537,7 +1537,10 @@ bgp_open_capability (struct stream *s, struct peer *peer) { stream_putw (s, afi); stream_putc (s, (safi == SAFI_MPLS_VPN) ? SAFI_MPLS_LABELED_VPN : safi); - stream_putc (s, 0); //Forwarding is not retained as of now. + if (bgp_flag_check(peer->bgp, BGP_FLAG_GR_PRESERVE_FWD)) + stream_putc (s, RESTART_F_BIT); + else + stream_putc (s, 0); } } diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h index 86fa207b6..b82cf9dde 100644 --- a/bgpd/bgpd.h +++ b/bgpd/bgpd.h @@ -289,6 +289,7 @@ struct bgp #define BGP_FLAG_MULTIPATH_RELAX_AS_SET (1 << 17) #define BGP_FLAG_FORCE_STATIC_PROCESS (1 << 18) #define BGP_FLAG_SHOW_HOSTNAME (1 << 19) +#define BGP_FLAG_GR_PRESERVE_FWD (1 << 20) /* BGP Per AF flags */ u_int16_t af_flags[AFI_MAX][SAFI_MAX]; |