Module Name: src Committed By: christos Date: Wed Apr 20 15:46:08 UTC 2016
Modified Files: src/sys/net/npf: npf_tableset.c Log Message: /32 and /128 are valid netmasks. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/net/npf/npf_tableset.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/net/npf/npf_tableset.c diff -u src/sys/net/npf/npf_tableset.c:1.22 src/sys/net/npf/npf_tableset.c:1.23 --- src/sys/net/npf/npf_tableset.c:1.22 Sun Aug 10 21:54:12 2014 +++ src/sys/net/npf/npf_tableset.c Wed Apr 20 11:46:08 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_tableset.c,v 1.22 2014/08/11 01:54:12 rmind Exp $ */ +/* $NetBSD: npf_tableset.c,v 1.23 2016/04/20 15:46:08 christos Exp $ */ /*- * Copyright (c) 2009-2014 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: npf_tableset.c,v 1.22 2014/08/11 01:54:12 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf_tableset.c,v 1.23 2016/04/20 15:46:08 christos Exp $"); #include <sys/param.h> #include <sys/types.h> @@ -453,7 +453,7 @@ table_cidr_check(const u_int aidx, const * For IPv4 (aidx = 0) - 32 and for IPv6 (aidx = 1) - 128. * If it is a host - shall use NPF_NO_NETMASK. */ - if (mask >= (aidx ? 128 : 32) && mask != NPF_NO_NETMASK) { + if (mask > (aidx ? 128 : 32) && mask != NPF_NO_NETMASK) { return EINVAL; } return 0;