summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_open.c5
-rw-r--r--bgpd/bgpd.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c
index 4c698562be..af3c0486e5 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 86fa207b6b..b82cf9dde9 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];