renamed ipv4_prefix_to_mask to distinguish from the ipv6 function

This commit is contained in:
Nikos Mavrogiannopoulos
2015-10-29 23:22:35 +01:00
parent de01c9d5c3
commit 7d4a8f1551
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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)
{
+1 -1
View File
@@ -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);