aboutsummaryrefslogtreecommitdiff
path: root/src/cidr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cidr.c')
-rw-r--r--src/cidr.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/cidr.c b/src/cidr.c
index 6de7f36..f710e83 100644
--- a/src/cidr.c
+++ b/src/cidr.c
@@ -124,7 +124,8 @@ grecs_str_to_cidr(struct grecs_cidr *pcidr, const char *str,
len = strlen(str);
if (len > sizeof(ipbuf)) {
- grecs_error(locus, 0, _("network length too big: %s"), str);
+ grecs_error(locus, 0, _("invalid network mask: %s"),
+ str);
return -1;
}
@@ -136,25 +137,25 @@ grecs_str_to_cidr(struct grecs_cidr *pcidr, const char *str,
else if (grecs_str_is_ipv6(ipbuf))
cidr.family = AF_INET6;
else {
- grecs_error(locus, 0, _("unrecognized network family: %s"),
+ grecs_error(locus, 0, _("unrecognized address family: %s"),
str);
return -1;
}
rc = inet_pton(cidr.family, ipbuf, &inaddr);
if (rc == -1) {
- grecs_error(locus, 0, _("unrecognized network family: %s"),
+ grecs_error(locus, 0, _("unrecognized address family: %s"),
str);
return -1;
} else if (rc != 1) {
- grecs_error(locus, 0, _("invalid network: %s"),
+ grecs_error(locus, 0, _("invalid network address: %s"),
str);
return -1;
}
cidr.len = grecs_inaddr_to_bytes(cidr.family, &inaddr, cidr.address);
if (cidr.len == 0) {
- grecs_error(locus, 0, _("unrecognized network family: %s"),
+ grecs_error(locus, 0, _("unrecognized address family: %s"),
str);
return -1;
}

Return to:

Send suggestions and report system problems to the System administrator.