Is this a bug in gargoyle_firewall_util.sh script ?
Posted: Tue Mar 15, 2011 11:50 pm
Looking through gargoyle_firewall_util.sh from 1.3.7 I'm not sure if I have found a couple of typos or if I'm just misreading the script. In particular, see the spelling of vars "egress_exits" & "ingress_exits" assignments vs the if blocks which reference "egress_exists" & "ingress_exists". As I am by no means a script expert, then I probably don't understand some subtleties going on here and happy to be wrong, please be gentle on this novice.
Version of file is from 1.3.7 but would be interesting to see if others could check later versions.
Version of file is from 1.3.7 but would be interesting to see if others could check later versions.
Code: Select all
insert_restriction_rules()
{
if [ -z "$wan_if" ] ; then return ; fi
egress_exits=$(iptables -t filter -L egress_restrictions 2>/dev/null)
ingress_exits=$(iptables -t filter -L ingress_restrictions 2>/dev/null)
if [ -n "$egress_exists" ] ; then
delete_chain_from_table filter egress_whitelist
delete_chain_from_table filter egress_restrictions
fi
if [ -n "$ingress_exists" ] ; then
delete_chain_from_table filter ingress_whitelist
delete_chain_from_table filter ingress_restrictions
fi
................
}