diff options
author | smos <seth.mos@dds.nl> | 2012-04-18 10:43:02 +0200 |
---|---|---|
committer | smos <seth.mos@dds.nl> | 2012-04-18 10:43:02 +0200 |
commit | 1a5f87d1c856115009101d29732c53094082c6a2 (patch) | |
tree | 2d277106d93b3bbc006b54c5dfbe4b1ff3ab1711 /etc/rc.newwanipv6 | |
parent | 2f0a49e922e282a1abc641ec9d489f2678e069be (diff) | |
download | pfsense-1a5f87d1c856115009101d29732c53094082c6a2.zip pfsense-1a5f87d1c856115009101d29732c53094082c6a2.tar.gz |
Handle multiple IPv6 DNS servers in rc.newwanipv6, remove chunk of broken code in the DHCPv6 server that added duplicate lines. Redmine ticket #2380
Diffstat (limited to 'etc/rc.newwanipv6')
-rwxr-xr-x | etc/rc.newwanipv6 | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/etc/rc.newwanipv6 b/etc/rc.newwanipv6 index ab3ef7a..9f02772 100755 --- a/etc/rc.newwanipv6 +++ b/etc/rc.newwanipv6 @@ -75,9 +75,15 @@ $curwanipv6 = get_interface_ipv6(); $interface = "wan"; $interface_real = get_real_interface(); -if(is_ipaddrv6(trim($_ENV['new_domain_name_servers']))) { - file_put_contents("{$g['varetc_path']}/nameserver_v6{$interface}", trim($_ENV['new_domain_name_servers'])); +$name_servers = explode(" ", $_ENV['new_domain_name_servers']); +$valid_ns = array(); +foreach($name_servers as $ns) { + if(is_ipaddrv6(trim($ns))) + $valid_ns[] = trim($ns); } +if(count($valid_ns > 0)) + file_put_contents("{$g['varetc_path']}/nameserver_v6{$interface}", implode("\n", $valid_ns)); + if(!empty($_ENV['new_domain_name'])) { file_put_contents("{$g['varetc_path']}/searchdomain_v6{$interface}", $_ENV['new_domain_name']); } |