summaryrefslogtreecommitdiffstats
path: root/ripd/rip_routemap.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 /ripd/rip_routemap.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 'ripd/rip_routemap.c')
-rw-r--r--ripd/rip_routemap.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ripd/rip_routemap.c b/ripd/rip_routemap.c
index 4e848766d..102b64df6 100644
--- a/ripd/rip_routemap.c
+++ b/ripd/rip_routemap.c
@@ -158,8 +158,9 @@ route_match_ip_next_hop(void *rule, const struct prefix *prefix,
if (type == RMAP_RIP) {
rinfo = object;
p.family = AF_INET;
- p.prefix = (rinfo->nh.gate.ipv4.s_addr) ? rinfo->nh.gate.ipv4
- : rinfo->from;
+ p.prefix = (rinfo->nh.gate.ipv4.s_addr != INADDR_ANY)
+ ? rinfo->nh.gate.ipv4
+ : rinfo->from;
p.prefixlen = IPV4_MAX_BITLEN;
alist = access_list_lookup(AFI_IP, (char *)rule);
@@ -207,8 +208,9 @@ route_match_ip_next_hop_prefix_list(void *rule, const struct prefix *prefix,
if (type == RMAP_RIP) {
rinfo = object;
p.family = AF_INET;
- p.prefix = (rinfo->nh.gate.ipv4.s_addr) ? rinfo->nh.gate.ipv4
- : rinfo->from;
+ p.prefix = (rinfo->nh.gate.ipv4.s_addr != INADDR_ANY)
+ ? rinfo->nh.gate.ipv4
+ : rinfo->from;
p.prefixlen = IPV4_MAX_BITLEN;
plist = prefix_list_lookup(AFI_IP, (char *)rule);