Is this a bug in gargoyle_firewall_util.sh script ?

If your problem doesn't fall into one of the other categories, report it here.

Moderator: Moderators

Post Reply
hipitihop
Posts: 22
Joined: Thu Aug 12, 2010 1:16 am

Is this a bug in gargoyle_firewall_util.sh script ?

Post by hipitihop »

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.

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
	................
}

Eric
Site Admin
Posts: 1443
Joined: Sat Jun 14, 2008 1:14 pm

Re: Is this a bug in gargoyle_firewall_util.sh script ?

Post by Eric »

That is a bug, but it's already been fixed in the latest versions of Gargoyle.

Post Reply