summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_route.c
diff options
context:
space:
mode:
authorpaul <paul>2008-07-22 21:11:48 +0000
committerpaul <paul>2008-07-22 21:11:48 +0000
commitd0cee3d3d7267f8f5c1d1ffd5c5fd8802a9db987 (patch)
treeb621bcb7b53d309820d6b4a1c855da6a4755c7c5 /bgpd/bgp_route.c
parent42f57d1707f9da733ca2113bf8d9b176bf088ecf (diff)
downloadquagga-d0cee3d3d7267f8f5c1d1ffd5c5fd8802a9db987.tar.bz2
quagga-d0cee3d3d7267f8f5c1d1ffd5c5fd8802a9db987.tar.xz
[bgpd] Fix triggerable crash when compiled with --disable-bgp-announce
2008-07-22 Paul Jakma <paul.jakma@sun.com> * HACKING: Document preference for compiler conditional code, over cpp conditional. * configure.ac: DISABLE_BGP_ANNOUNCE always should be defined. * bgp_{packet,route,advertise}.c: change to compiler testing of DISABLE_BGP_ANNOUNCE, rather than cpp. 2008-07-22 MIYAJIMA Mitsuharu <miyajima.mitsuharu@anchor.jp> * bgp_packet.c: (bgp_update_packet_eor) Fix crash triggerable if a bgpd was compiled with --disable-bgp-announce and if GR is advertised by peer.
Diffstat (limited to 'bgpd/bgp_route.c')
-rw-r--r--bgpd/bgp_route.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 4fbc4bab..b639db05 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -742,9 +742,8 @@ bgp_announce_check (struct bgp_info *ri, struct peer *peer, struct prefix *p,
filter = &peer->filter[afi][safi];
bgp = peer->bgp;
-#ifdef DISABLE_BGP_ANNOUNCE
- return 0;
-#endif
+ if (DISABLE_BGP_ANNOUNCE)
+ return 0;
/* Do not send announces to RS-clients from the 'normal' bgp_table. */
if (CHECK_FLAG(peer->af_flags[afi][safi], PEER_FLAG_RSERVER_CLIENT))
@@ -1095,9 +1094,8 @@ bgp_announce_check_rsclient (struct bgp_info *ri, struct peer *rsclient,
filter = &rsclient->filter[afi][safi];
bgp = rsclient->bgp;
-#ifdef DISABLE_BGP_ANNOUNCE
- return 0;
-#endif
+ if (DISABLE_BGP_ANNOUNCE)
+ return 0;
/* Do not send back route to sender. */
if (from == rsclient)