summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_packet.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_packet.c')
-rw-r--r--bgpd/bgp_packet.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
index f92a88ad..19375ef9 100644
--- a/bgpd/bgp_packet.c
+++ b/bgpd/bgp_packet.c
@@ -235,9 +235,8 @@ bgp_update_packet_eor (struct peer *peer, afi_t afi, safi_t safi)
struct stream *s;
struct stream *packet;
-#ifdef DISABLE_BGP_ANNOUNCE
- return;
-#endif /* DISABLE_BGP_ANNOUNCE */
+ if (DISABLE_BGP_ANNOUNCE)
+ return NULL;
if (BGP_DEBUG (normal, NORMAL))
zlog_debug ("send End-of-RIB for %s to %s", afi_safi_print (afi, safi), peer->host);
@@ -369,9 +368,8 @@ bgp_default_update_send (struct peer *peer, struct attr *attr,
char attrstr[BUFSIZ];
char buf[BUFSIZ];
-#ifdef DISABLE_BGP_ANNOUNCE
- return;
-#endif /* DISABLE_BGP_ANNOUNCE */
+ if (DISABLE_BGP_ANNOUNCE)
+ return;
if (afi == AFI_IP)
str2prefix ("0.0.0.0/0", &p);
@@ -438,9 +436,8 @@ bgp_default_withdraw_send (struct peer *peer, afi_t afi, safi_t safi)
bgp_size_t total_attr_len;
char buf[BUFSIZ];
-#ifdef DISABLE_BGP_ANNOUNCE
- return;
-#endif /* DISABLE_BGP_ANNOUNCE */
+ if (DISABLE_BGP_ANNOUNCE)
+ return;
if (afi == AFI_IP)
str2prefix ("0.0.0.0/0", &p);
@@ -960,9 +957,8 @@ bgp_route_refresh_send (struct peer *peer, afi_t afi, safi_t safi,
struct bgp_filter *filter;
int orf_refresh = 0;
-#ifdef DISABLE_BGP_ANNOUNCE
- return;
-#endif /* DISABLE_BGP_ANNOUNCE */
+ if (DISABLE_BGP_ANNOUNCE)
+ return;
filter = &peer->filter[afi][safi];
@@ -1190,9 +1186,9 @@ bgp_open_receive (struct peer *peer, bgp_size_t size)
/* Receive OPEN message log */
if (BGP_DEBUG (normal, NORMAL))
- zlog_debug ("%s rcv OPEN, version %d, remote-as (in open) %u,"
+ zlog_debug ("%s rcv OPEN, version %d, remote-as (in open) %d,"
" holdtime %d, id %s",
- peer->host, version, (unsigned)remote_as, holdtime,
+ peer->host, version, remote_as, holdtime,
inet_ntoa (remote_id));
/* BEGIN to read the capability here, but dont do it yet */
@@ -1237,7 +1233,7 @@ bgp_open_receive (struct peer *peer, bgp_size_t size)
zlog_debug ("%s [AS4] OPEN remote_as is AS_TRANS, but no AS4."
" Odd, but proceeding.", peer->host);
else if (as4 < BGP_AS_MAX && BGP_DEBUG (as4, AS4))
- zlog_debug ("%s [AS4] OPEN remote_as is AS_TRANS, but AS4 %u fits "
+ zlog_debug ("%s [AS4] OPEN remote_as is AS_TRANS, but AS4 (%u) fits "
"in 2-bytes, very odd peer.", peer->host, as4);
if (as4)
remote_as = as4;