diff options
author | smos <seth.mos@dds.nl> | 2012-04-04 15:53:37 +0200 |
---|---|---|
committer | smos <seth.mos@dds.nl> | 2012-04-04 15:53:37 +0200 |
commit | 4a41dff7afe60a6bd228019f2bccd1e5577cdf6e (patch) | |
tree | 31ee66b29282ac0248909fef34ce4e17ae8304d5 | |
parent | 479f0fda05952bc8bdbe8118db562121217ff465 (diff) | |
download | pfsense-4a41dff7afe60a6bd228019f2bccd1e5577cdf6e.zip pfsense-4a41dff7afe60a6bd228019f2bccd1e5577cdf6e.tar.gz |
Bail out without a valid IPv6 address so we don't generate a invalid dhcpv6 server config
-rw-r--r-- | etc/inc/services.inc | 3 | ||||
-rwxr-xr-x | etc/rc.update_bogons.sh | 14 |
2 files changed, 9 insertions, 8 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc index 22bfb61..d6ba3cd 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -670,9 +670,10 @@ function services_dhcpdv6_configure() { /* we add a fake entry for interfaces that are set to track6 another WAN */ foreach($Iflist as $ifname) { $realif = get_real_interface($ifname); - $ifcfgipv6 = Net_IPv6::getNetmask(find_interface_ipv6($realif), 64); + $ifcfgipv6 = find_interface_ipv6($realif); if(!is_ipaddrv6($ifcfgipv6)) continue; + $ifcfgipv6 = Net_IPv6::getNetmask($ifcfgipv6, 64); if($config['interfaces'][$ifname]['track6-interface'] <> "") { $trackifname = $config['interfaces'][$ifname]['track6-interface']; $trackcfg = $config['interfaces'][$trackifname]; diff --git a/etc/rc.update_bogons.sh b/etc/rc.update_bogons.sh index aec80a1..37d2c6d 100755 --- a/etc/rc.update_bogons.sh +++ b/etc/rc.update_bogons.sh @@ -21,22 +21,22 @@ echo "rc.update_bogons.sh is beginning the update cycle." | logger /etc/rc.conf_mount_rw /usr/bin/fetch -q -o /tmp/bogons "http://files.pfsense.org/mirrors/bogon-bn-nonagg.txt" -if [ ! -f /tmp/bogons ]; then +/usr/bin/fetch -q -o /tmp/bogonsv6 "http://files.pfsense.org/mirrors/fullbogons-ipv6.txt" +if [ ! -f /tmp/bogons ]; echo "Could not download http://files.pfsense.org/mirrors/bogon-bn-nonagg.txt" | logger - # Relaunch and sleep - sh /etc/rc.update_bogons.sh & - exit + dl_error="true" fi - -/usr/bin/fetch -q -o /tmp/bogonsv6 "http://files.pfsense.org/mirrors/fullbogons-ipv6.txt" if [ ! -f /tmp/bogonsv6 ]; then echo "Could not download http://files.pfsense.org/mirrors/fullbogons-ipv6.txt" | logger + dl_error="true" +fi + +if [ "$dl_error" != "" ];then # Relaunch and sleep sh /etc/rc.update_bogons.sh & exit fi - BOGON_MD5=`/usr/bin/fetch -q -o - "http://files.pfsense.org/mirrors/bogon-bn-nonagg.txt.md5" | awk '{ print $4 }'` ON_DISK_MD5=`md5 /tmp/bogons | awk '{ print $4 }'` if [ "$BOGON_MD5" = "$ON_DISK_MD5" ]; then |