diff options
author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-02-06 07:49:02 +0100 |
---|---|---|
committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-02-06 08:00:12 +0100 |
commit | 975a328e2eb3d1bea5fbc3c232580dd4739d59f0 (patch) | |
tree | 587e51ff3bbf8dc368ecd1c414615d19ff5139ae /ripd/rip_routemap.c | |
parent | Merge pull request #5761 from qlyoung/fix-bgp-gr-cruft (diff) | |
download | frr-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.c | 10 |
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); |