diff options
author | Chris Buechler <cmb@pfsense.org> | 2016-07-08 21:52:39 -0500 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2016-07-08 21:54:07 -0500 |
commit | e21583067f290b9832e16605a65d971da9db98cf (patch) | |
tree | 7d466d8454525fa185d1fd2af992254af6700b4e | |
parent | 84b6f05a2a6da1082139a128ddf91035cb0fc760 (diff) | |
download | pfsense-e21583067f290b9832e16605a65d971da9db98cf.zip pfsense-e21583067f290b9832e16605a65d971da9db98cf.tar.gz |
Verify a valid IPv6 subnet is going to be used before including in radvd's config. Ticket #6581
-rw-r--r-- | src/etc/inc/services.inc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/etc/inc/services.inc b/src/etc/inc/services.inc index f6fcf31..ce687e3 100644 --- a/src/etc/inc/services.inc +++ b/src/etc/inc/services.inc @@ -131,6 +131,10 @@ function services_radvd_configure($blacklist = array()) { $ifcfgsnv6 = get_interface_subnetv6($dhcpv6if); $subnetv6 = gen_subnetv6($ifcfgipv6, $ifcfgsnv6); + if (!is_subnetv6($subnetv6 . "/" . $ifcfgsnv6)) { + log_error("radvd: skipping configuration for interface $dhcpv6if because its subnet or prefix length is invalid."); + continue; + } $radvdifs[$realif] = $realif; $radvdconf .= "# Generated for DHCPv6 Server $dhcpv6if\n"; @@ -342,7 +346,7 @@ function services_radvd_configure($blacklist = array()) { $radvdconf .= "\tAdvLinkMTU 1280;\n"; } $radvdconf .= "\tAdvOtherConfigFlag on;\n"; - $radvdconf .= "\t\tprefix {$subnetv6}/{$ifcfgsnv6} {\n"; + $radvdconf .= "\tprefix {$subnetv6}/{$ifcfgsnv6} {\n"; $radvdconf .= "\t\tAdvOnLink on;\n"; $radvdconf .= "\t\tAdvAutonomous on;\n"; $radvdconf .= "\t\tAdvRouterAddr on;\n"; |