diff options
author | Ermal <eri@pfsense.org> | 2013-01-31 11:07:59 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-01-31 11:07:59 +0000 |
commit | 7a04cd20c4d5991c5afeb431589c75aa3956b654 (patch) | |
tree | c0ce816db46701de74ef0a34b8234662598d5de3 /etc/rc.newwanipv6 | |
parent | dd1fc379b433c9f6c03d45c2e7a9a5f7dda043d6 (diff) | |
download | pfsense-7a04cd20c4d5991c5afeb431589c75aa3956b654.zip pfsense-7a04cd20c4d5991c5afeb431589c75aa3956b654.tar.gz |
Create link_interface_to_track6 to make code more readble and easily trackble. Also improve the generation of rules to avoid creating problems during filter reload and some optimizations with it
Diffstat (limited to 'etc/rc.newwanipv6')
-rwxr-xr-x | etc/rc.newwanipv6 | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/etc/rc.newwanipv6 b/etc/rc.newwanipv6 index c2266ae..6d33ead 100755 --- a/etc/rc.newwanipv6 +++ b/etc/rc.newwanipv6 @@ -104,6 +104,9 @@ if(count($valid_ns > 0)) if(!empty($_ENV['new_domain_name'])) file_put_contents("{$g['varetc_path']}/searchdomain_v6{$interface}", $_ENV['new_domain_name']); +/* write current WAN IPv6 to file */ +file_put_contents("{$g['vardb_path']}/{$interface}_ipv6", $curwanipv6); + log_error("rc.newwanipv6: on (IP address: {$curwanipv6}) (interface: {$interface}) (real interface: {$interface_real})."); $oldipv6 = ""; @@ -114,24 +117,11 @@ $grouptmp = link_interface_to_group($interface); if (!empty($grouptmp)) array_walk($grouptmp, 'interface_group_add_member'); +link_interface_to_track6($interface, "update"); + /* regenerate resolv.conf if DNS overrides are allowed */ 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]['ipaddrv6']) { - 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); |