aboutsummaryrefslogtreecommitdiffstats
path: root/net/isc-dhcp42-server
diff options
context:
space:
mode:
authorgarga <garga@FreeBSD.org>2015-07-16 19:51:56 +0800
committergarga <garga@FreeBSD.org>2015-07-16 19:51:56 +0800
commit3de9ed7a87d6e6e162d0627ab2cb8a3b2c2e4570 (patch)
tree7297f27d3189da974871273ccdb0a6f65782fe8f /net/isc-dhcp42-server
parent1a7b77bdb5711b8db7e183be25b5379e0c14c746 (diff)
downloadfreebsd-ports-graphics-3de9ed7a87d6e6e162d0627ab2cb8a3b2c2e4570.tar.gz
freebsd-ports-graphics-3de9ed7a87d6e6e162d0627ab2cb8a3b2c2e4570.tar.zst
freebsd-ports-graphics-3de9ed7a87d6e6e162d0627ab2cb8a3b2c2e4570.zip
Since 4.2.8/4.3.2 isc-dhcp-server started to check if prefix6 range is
within declared subnet and if prefix6 network mask is bigger or equal subnet mask. Remove these checks and make prefix delegation work as expected. For reference - https://redmine.pfsense.org/issues/4829 PR: 201601 Approved by: zi (maintainer) Sponsored by: Netgate
Diffstat (limited to 'net/isc-dhcp42-server')
-rw-r--r--net/isc-dhcp42-server/Makefile2
-rw-r--r--net/isc-dhcp42-server/files/patch-server_confpars.c43
2 files changed, 44 insertions, 1 deletions
diff --git a/net/isc-dhcp42-server/Makefile b/net/isc-dhcp42-server/Makefile
index ccdf5556811..0ca6d9c74d7 100644
--- a/net/isc-dhcp42-server/Makefile
+++ b/net/isc-dhcp42-server/Makefile
@@ -18,7 +18,7 @@ LICENSE= ISCL
USES= gmake
PATCHLEVEL= P1
-PORTREVISION_SERVER= 0
+PORTREVISION_SERVER= 1
PORTREVISION_CLIENT= 0
PORTREVISION_RELAY= 0
diff --git a/net/isc-dhcp42-server/files/patch-server_confpars.c b/net/isc-dhcp42-server/files/patch-server_confpars.c
new file mode 100644
index 00000000000..a60f41c861a
--- /dev/null
+++ b/net/isc-dhcp42-server/files/patch-server_confpars.c
@@ -0,0 +1,43 @@
+--- server/confpars.c.orig 2015-02-27 13:42:45 UTC
++++ server/confpars.c
+@@ -3926,28 +3926,10 @@ parse_prefix6(struct parse *cfile, struc
+ return;
+ }
+
+- /* Make sure starting prefix is within the subnet */
+- if (!addr_eq(group->subnet->net,
+- subnet_number(lo, group->subnet->netmask))) {
+- parse_warn(cfile, "prefix6 start prefix"
+- " is outside the subnet");
+- skip_to_semi(cfile);
+- return;
+- }
+-
+ if (!parse_ip6_addr(cfile, &hi)) {
+ return;
+ }
+
+- /* Make sure ending prefix is within the subnet */
+- if (!addr_eq(group->subnet->net,
+- subnet_number(hi, group->subnet->netmask))) {
+- parse_warn(cfile, "prefix6 end prefix"
+- " is outside the subnet");
+- skip_to_semi(cfile);
+- return;
+- }
+-
+ /*
+ * Next is '/' number ';'.
+ */
+@@ -3970,11 +3952,6 @@ parse_prefix6(struct parse *cfile, struc
+ parse_warn(cfile, "networks have 0 to 128 bits (exclusive)");
+ return;
+ }
+- if (bits < group->subnet->prefix_len) {
+- parse_warn(cfile, "network mask smaller than subnet mask");
+- skip_to_semi(cfile);
+- return;
+- }
+ if (!is_cidr_mask_valid(&lo, bits) ||
+ !is_cidr_mask_valid(&hi, bits)) {
+ parse_warn(cfile, "network mask too short");