FreeBSD Bugzilla – Attachment 158816 Details for
Bug 201601
[patch] net/isc-dhcp4[23]-server: Prefix delegation broken by new ISC DHCP Server 4.2.8/4.3.2 subnet check
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Improved fix
dhcp-server_v2.diff (text/plain), 4.53 KB, created by
Renato Botelho
on 2015-07-15 22:46:01 UTC
(
hide
)
Description:
Improved fix
Filename:
MIME Type:
Creator:
Renato Botelho
Created:
2015-07-15 22:46:01 UTC
Size:
4.53 KB
patch
obsolete
>Index: isc-dhcp42-server/Makefile >=================================================================== >--- isc-dhcp42-server/Makefile (revision 392177) >+++ isc-dhcp42-server/Makefile (working copy) >@@ -18,7 +18,7 @@ > USES= gmake > > PATCHLEVEL= P1 >-PORTREVISION_SERVER= 0 >+PORTREVISION_SERVER= 1 > PORTREVISION_CLIENT= 0 > PORTREVISION_RELAY= 0 > >Index: isc-dhcp42-server/files/patch-server_confpars.c >=================================================================== >--- isc-dhcp42-server/files/patch-server_confpars.c (revision 0) >+++ isc-dhcp42-server/files/patch-server_confpars.c (working copy) >@@ -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"); > >Property changes on: isc-dhcp42-server/files/patch-server_confpars.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: isc-dhcp43-server/Makefile >=================================================================== >--- isc-dhcp43-server/Makefile (revision 392176) >+++ isc-dhcp43-server/Makefile (working copy) >@@ -18,7 +18,7 @@ > USES= gmake > > #PATCHLEVEL= P1 >-PORTREVISION_SERVER= 0 >+PORTREVISION_SERVER= 1 > PORTREVISION_CLIENT= 0 > PORTREVISION_RELAY= 0 > >Index: isc-dhcp43-server/files/patch-server_confpars.c >=================================================================== >--- isc-dhcp43-server/files/patch-server_confpars.c (revision 0) >+++ isc-dhcp43-server/files/patch-server_confpars.c (working copy) >@@ -0,0 +1,43 @@ >+--- server/confpars.c.orig 2015-02-26 19:35:43 UTC >++++ server/confpars.c >+@@ -4161,28 +4161,10 @@ parse_prefix6(struct parse *cfile, >+ 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 ';'. >+ */ >+@@ -4205,11 +4187,6 @@ parse_prefix6(struct parse *cfile, >+ 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"); > >Property changes on: isc-dhcp43-server/files/patch-server_confpars.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 201601
:
158811
| 158816