summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_open.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2020-02-06 15:37:20 +0100
committerDonatas Abraitis <donatas.abraitis@gmail.com>2020-02-06 16:11:38 +0100
commit892fedb611bd1d0ee5c4674069baa8666f7d0255 (patch)
tree57ab49d2884dab757f2cc1d88d332ca2be3ecbfc /bgpd/bgp_open.c
parenttools: Add coccinelle script to replace all bgp_flag_* functions (diff)
downloadfrr-892fedb611bd1d0ee5c4674069baa8666f7d0255.tar.xz
frr-892fedb611bd1d0ee5c4674069baa8666f7d0255.zip
bgpd: Replace bgp_flag_* to [UN]SET/CHECK_FLAG macros
Most of the code uses macros, thus let's keep the code unified. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'bgpd/bgp_open.c')
-rw-r--r--bgpd/bgp_open.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c
index 473a51c5a..906083f75 100644
--- a/bgpd/bgp_open.c
+++ b/bgpd/bgp_open.c
@@ -1341,7 +1341,7 @@ static void bgp_peer_send_gr_capability(struct stream *s, struct peer *peer,
* only when GR config is present
*/
if (CHECK_FLAG(peer->flags, PEER_FLAG_GRACEFUL_RESTART)) {
- if (bgp_flag_check(peer->bgp, BGP_FLAG_GR_PRESERVE_FWD)
+ if (CHECK_FLAG(peer->bgp->flags, BGP_FLAG_GR_PRESERVE_FWD)
&& BGP_DEBUG(graceful_restart, GRACEFUL_RESTART))
zlog_debug("[BGP_GR] F bit Set");
@@ -1361,7 +1361,8 @@ static void bgp_peer_send_gr_capability(struct stream *s, struct peer *peer,
&pkt_safi);
stream_putw(s, pkt_afi);
stream_putc(s, pkt_safi);
- if (bgp_flag_check(peer->bgp, BGP_FLAG_GR_PRESERVE_FWD))
+ if (CHECK_FLAG(peer->bgp->flags,
+ BGP_FLAG_GR_PRESERVE_FWD))
stream_putc(s, RESTART_F_BIT);
else
stream_putc(s, 0);