]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/prefix.c
Merge pull request #5778 from ton31337/fix/add_doc_for_ebgp_connected_route_check
[mirror_frr.git] / lib / prefix.c
index cb6e53b30539f1cd7d6cdb8041f8fe0dcdfa561e..199ff3267bce011aa2cbb96876685846b9f8075a 100644 (file)
@@ -659,7 +659,7 @@ void apply_mask_ipv4(struct prefix_ipv4 *p)
 /* If prefix is 0.0.0.0/0 then return 1 else return 0. */
 int prefix_ipv4_any(const struct prefix_ipv4 *p)
 {
-       return (p->prefix.s_addr == 0 && p->prefixlen == 0);
+       return (p->prefix.s_addr == INADDR_ANY && p->prefixlen == 0);
 }
 
 /* Allocate a new ip version 6 route */
@@ -1144,7 +1144,7 @@ int netmask_str2prefix_str(const char *net_str, const char *mask_str,
        } else {
                destination = ntohl(network.s_addr);
 
-               if (network.s_addr == 0)
+               if (network.s_addr == INADDR_ANY)
                        prefixlen = 0;
                else if (IN_CLASSC(destination))
                        prefixlen = 24;