mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Throw an error when we cannot download bogons file instead of blindly assuming it succeedded.
This commit is contained in:
parent
dce360e2b4
commit
3fb63eb461
@ -12,7 +12,12 @@ sleep $value
|
||||
|
||||
/etc/rc.conf_mount_rw
|
||||
/usr/bin/fetch -q -o /tmp/bogons "http://www.pfsense.com/mirrors/bogon-bn-nonagg.txt"
|
||||
if [ ! -f /tmp/bogons ]; then
|
||||
echo "Could not download http://www.pfsense.com/mirrors/bogon-bn-nonagg.txt" | logger
|
||||
exit
|
||||
fi
|
||||
egrep -v "^192.168.0.0/16|^172.16.0.0/12|^10.0.0.0/8" /tmp/bogons > /etc/bogons
|
||||
/etc/rc.conf_mount_ro
|
||||
/sbin/pfctl -t bogons -T replace -f /etc/bogons
|
||||
rm /tmp/bogons
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user