summaryrefslogtreecommitdiffstats
path: root/etc/inc/services.inc
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2015-04-04 20:36:13 -0500
committerChris Buechler <cmb@pfsense.org>2015-04-04 20:37:32 -0500
commit686e53c0001704fc8bd3f19eb73a0c034bd730f6 (patch)
tree092a64b2ae4229ce0ebbbcad2a027d384dc304f0 /etc/inc/services.inc
parent0a9e6c85f05b1027156618a9ccf1e1b12f31683e (diff)
downloadpfsense-686e53c0001704fc8bd3f19eb73a0c034bd730f6.zip
pfsense-686e53c0001704fc8bd3f19eb73a0c034bd730f6.tar.gz
Include additional subnets for RAs in radvd.conf. Ticket #4468
Conflicts: etc/inc/services.inc
Diffstat (limited to 'etc/inc/services.inc')
-rw-r--r--etc/inc/services.inc40
1 files changed, 40 insertions, 0 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index 67df595..9c58b24 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -140,9 +140,14 @@ function services_radvd_configure($blacklist = array()) {
$radvdconf .= "\tAdvLinkMTU {$mtu};\n";
} else {
$radvdconf .= "\tAdvLinkMTU 1280;\n";
+<<<<<<< HEAD
}
// $radvdconf .= "\tDeprecatePrefix on;\n";
switch ($dhcpv6ifconf['rapriority']) {
+=======
+
+ switch($dhcpv6ifconf['rapriority']) {
+>>>>>>> 38253ce... Include additional subnets for RAs in radvd.conf. Ticket #4468
case "low":
$radvdconf .= "\tAdvDefaultPreference low;\n";
break;
@@ -190,6 +195,41 @@ function services_radvd_configure($blacklist = array()) {
}
$radvdconf .= "\t};\n";
+ if (is_array($dhcpv6ifconf['subnets']['item'])) {
+ foreach ($dhcpv6ifconf['subnets']['item'] as $subnet) {
+ if (is_subnetv6($subnet)) {
+ $radvdconf .= "\tprefix {$subnet} {\n";
+ if($carpif == true) {
+ $radvdconf .= "\t\tDeprecatePrefix off;\n";
+ } else {
+ $radvdconf .= "\t\tDeprecatePrefix on;\n";
+ }
+ switch($dhcpv6ifconf['ramode']) {
+ case "managed":
+ $radvdconf .= "\t\tAdvOnLink on;\n";
+ $radvdconf .= "\t\tAdvAutonomous off;\n";
+ $radvdconf .= "\t\tAdvRouterAddr on;\n";
+ break;
+ case "router":
+ $radvdconf .= "\t\tAdvOnLink off;\n";
+ $radvdconf .= "\t\tAdvAutonomous off;\n";
+ $radvdconf .= "\t\tAdvRouterAddr on;\n";
+ break;
+ case "assist":
+ $radvdconf .= "\t\tAdvOnLink on;\n";
+ $radvdconf .= "\t\tAdvAutonomous on;\n";
+ $radvdconf .= "\t\tAdvRouterAddr on;\n";
+ break;
+ case "unmanaged":
+ $radvdconf .= "\t\tAdvOnLink on;\n";
+ $radvdconf .= "\t\tAdvAutonomous on;\n";
+ $radvdconf .= "\t\tAdvRouterAddr on;\n";
+ break;
+ }
+ $radvdconf .= "\t};\n";
+ }
+ }
+ }
if ($carpif === true) {
$radvdconf .= "\troute ::/0 {\n";
$radvdconf .= "\t\tRemoveRoute off;\n";
OpenPOWER on IntegriCloud