summaryrefslogtreecommitdiffstats
path: root/etc/rc.newwanipv6
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2012-04-01 09:55:27 +0200
committersmos <seth.mos@dds.nl>2012-04-01 09:55:27 +0200
commit86a139fcb71514ef174cd33031218f4109ee1bc5 (patch)
tree4c73fc2fe1d7d0c12b0760e4323e1c3a9888ae3a /etc/rc.newwanipv6
parent69b54cbe6ea9d96a89732b325abf57a5721e165b (diff)
downloadpfsense-86a139fcb71514ef174cd33031218f4109ee1bc5.zip
pfsense-86a139fcb71514ef174cd33031218f4109ee1bc5.tar.gz
Add interface tracking support for native dynamic IPv6 interfaces like dhcp6 too.
Correct the function name to reflect the RA daemon changeout
Diffstat (limited to 'etc/rc.newwanipv6')
-rwxr-xr-xetc/rc.newwanipv616
1 files changed, 15 insertions, 1 deletions
diff --git a/etc/rc.newwanipv6 b/etc/rc.newwanipv6
index 7bf2239..ab3ef7a 100755
--- a/etc/rc.newwanipv6
+++ b/etc/rc.newwanipv6
@@ -69,6 +69,8 @@ function restart_packages() {
log_error("rc.newwanipv6: Informational is starting.");
+/* FIXME: how can we find out about the correct interface name? */
+/* switch to ISC dhcp6 client? */
$curwanipv6 = get_interface_ipv6();
$interface = "wan";
$interface_real = get_real_interface();
@@ -108,6 +110,18 @@ system_resolvconf_generate(true);
/* write current WAN IPv6 to file */
file_put_contents("{$g['vardb_path']}/{$interface}_ipv6", $curwanipv6);
+/* check native IPv6 interface tracking */
+switch($config['interfaces'][$interface]['type6']) {
+ case "dhcp6":
+ foreach($config['interfaces'] as $iftrackname => $iftrack) {
+ if($iftrack['track6-interface'] == $interface) {
+ log_error("interface {%iftrackname} depends on {$interface}, configuring");
+ interface_track6_configure($iftrackname);
+ }
+ }
+ break;
+}
+
/* reconfigure static routes (kernel may have deleted them) */
system_routing_configure($interface);
@@ -155,6 +169,6 @@ services_igmpproxy_configure();
restart_packages();
-services_rtadvd_configure();
+services_radvd_configure();
?>
OpenPOWER on IntegriCloud