diff --git a/src/common.c b/src/common.c index 50370da6..1c109ffc 100644 --- a/src/common.c +++ b/src/common.c @@ -266,7 +266,7 @@ int ip_cmp(const struct sockaddr_storage *s1, const struct sockaddr_storage *s2) /* returns an allocated string with the mask to apply for the prefix */ -char* ipv4_prefix_to_mask(void *pool, unsigned prefix) +char* ipv4_prefix_to_strmask(void *pool, unsigned prefix) { struct in_addr in; char str[MAX_IP_STR]; @@ -604,7 +604,7 @@ int ip_route_sanity_check(void *pool, char **_route) /* we are most likely in the xxx.xxx.xxx.xxx/prefix format */ prefix = atoi(p); - pstr = ipv4_prefix_to_mask(pool, prefix); + pstr = ipv4_prefix_to_strmask(pool, prefix); if (pstr == NULL) { fprintf(stderr, "cannot figure format of route '%s'\n", route); return -1; diff --git a/src/common.h b/src/common.h index fa638a18..2ac6a4f3 100644 --- a/src/common.h +++ b/src/common.h @@ -49,7 +49,7 @@ ssize_t force_read(int sockfd, void *buf, size_t len); ssize_t force_read_timeout(int sockfd, void *buf, size_t len, unsigned sec); ssize_t recv_timeout(int sockfd, void *buf, size_t len, unsigned sec); int ip_cmp(const struct sockaddr_storage *s1, const struct sockaddr_storage *s2); -char* ipv4_prefix_to_mask(void *pool, unsigned prefix); +char* ipv4_prefix_to_strmask(void *pool, unsigned prefix); unsigned ipv6_prefix_to_mask(struct in6_addr *in6, unsigned prefix); inline static int valid_ipv6_prefix(unsigned prefix) { diff --git a/src/config.c b/src/config.c index 02c14184..1368e6e6 100644 --- a/src/config.c +++ b/src/config.c @@ -908,7 +908,7 @@ size_t urlfw_size = 0; if (prefix4 == 0) { READ_STRING("ipv4-netmask", config->network.ipv4_netmask); } else { - config->network.ipv4_netmask = ipv4_prefix_to_mask(config, prefix4); + config->network.ipv4_netmask = ipv4_prefix_to_strmask(config, prefix4); } READ_STRING("ipv6-network", config->network.ipv6);