mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Bail out without a valid IPv6 address so we don't generate a invalid dhcpv6 server config
This commit is contained in:
parent
479f0fda05
commit
4a41dff7af
@ -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];
|
||||
|
||||
@ -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
|
||||
echo "Could not download http://files.pfsense.org/mirrors/bogon-bn-nonagg.txt" | logger
|
||||
# Relaunch and sleep
|
||||
sh /etc/rc.update_bogons.sh &
|
||||
exit
|
||||
fi
|
||||
|
||||
/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
|
||||
dl_error="true"
|
||||
fi
|
||||
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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user