summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_updgrp_packet.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2020-02-06 07:49:02 +0100
committerDonatas Abraitis <donatas.abraitis@gmail.com>2020-02-06 08:00:12 +0100
commit975a328e2eb3d1bea5fbc3c232580dd4739d59f0 (patch)
tree587e51ff3bbf8dc368ecd1c414615d19ff5139ae /bgpd/bgp_updgrp_packet.c
parentMerge pull request #5761 from qlyoung/fix-bgp-gr-cruft (diff)
downloadfrr-975a328e2eb3d1bea5fbc3c232580dd4739d59f0.tar.xz
frr-975a328e2eb3d1bea5fbc3c232580dd4739d59f0.zip
*: Replace s_addr 0 => INADDR_ANY
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'bgpd/bgp_updgrp_packet.c')
-rw-r--r--bgpd/bgp_updgrp_packet.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/bgpd/bgp_updgrp_packet.c b/bgpd/bgp_updgrp_packet.c
index 39eb06528..86750c0fc 100644
--- a/bgpd/bgp_updgrp_packet.c
+++ b/bgpd/bgp_updgrp_packet.c
@@ -467,16 +467,16 @@ struct stream *bpacket_reformat_for_peer(struct bpacket *pkt,
mod_v4nh = &peer->nexthop.v4;
nh_modified = 1;
}
- } else if (!v4nh.s_addr) {
+ } else if (v4nh.s_addr == INADDR_ANY) {
mod_v4nh = &peer->nexthop.v4;
nh_modified = 1;
- } else if (
- peer->sort == BGP_PEER_EBGP
- && (bgp_multiaccess_check_v4(v4nh, peer) == 0)
- && !CHECK_FLAG(
+ } else if (peer->sort == BGP_PEER_EBGP
+ && (bgp_multiaccess_check_v4(v4nh, peer)
+ == 0)
+ && !CHECK_FLAG(
vec->flags,
BPKT_ATTRVEC_FLAGS_RMAP_NH_UNCHANGED)
- && !peer_af_flag_check(
+ && !peer_af_flag_check(
peer, paf->afi, paf->safi,
PEER_FLAG_NEXTHOP_UNCHANGED)) {
/* NOTE: not handling case where NH has new AFI
@@ -628,7 +628,7 @@ struct stream *bpacket_reformat_for_peer(struct bpacket *pkt,
mod_v4nh = &v4nh;
/* No route-map changes allowed for EVPN nexthops. */
- if (!v4nh.s_addr) {
+ if (v4nh.s_addr == INADDR_ANY) {
mod_v4nh = &peer->nexthop.v4;
nh_modified = 1;
}