svn commit: r214433 - projects/jailconf/usr.sbin/jail
Jamie Gritton
jamie at FreeBSD.org
Wed Oct 27 20:25:55 UTC 2010
Author: jamie
Date: Wed Oct 27 20:25:55 2010
New Revision: 214433
URL: http://svn.freebsd.org/changeset/base/214433
Log:
Use a little more "ifdef INET6".
Modified:
projects/jailconf/usr.sbin/jail/config.c
Modified: projects/jailconf/usr.sbin/jail/config.c
==============================================================================
--- projects/jailconf/usr.sbin/jail/config.c Wed Oct 27 19:01:09 2010 (r214432)
+++ projects/jailconf/usr.sbin/jail/config.c Wed Oct 27 20:25:55 2010 (r214433)
@@ -580,13 +580,23 @@ ip_params(struct cfjail *j)
}
if ((cs = strchr(s->s, '/'))) {
prefix = strtol(cs + 1, &ep, 10);
- if (!isip6 && *ep == '.'
+ if (
+#ifdef INET6
+ !isip6 &&
+#endif
+ *ep == '.'
? inet_pton(AF_INET, cs + 1, &addr4) != 1
- : *ep || prefix < 0 || prefix >
- (isip6 ? 128 : 32)) {
- jail_warnx(j, isip6
- ? "ip6.addr: bad prefixlen \"%s\""
- : "ip4.addr: bad netmask \"%s\"",
+ : *ep || prefix < 0 || prefix > (
+#ifdef INET6
+ isip6 ? 128 :
+#endif
+ 32)) {
+ jail_warnx(j,
+#ifdef INET6
+ isip6
+ ? "ip6.addr: bad prefixlen \"%s\"" :
+#endif
+ "ip4.addr: bad netmask \"%s\"",
cs);
error = -1;
}
More information about the svn-src-projects
mailing list