Re: ebtables 2.4.20

Bart De Schuymer <[email protected]>
Newsgroups gmane.linux.network.bridge.ebtables.devel
Message-ID <[email protected]>
On Monday 31 March 2003 23:42, Eppert, Aaron wrote:
> I am encountering a rather annoying bug with the final ebtables 2.4.20
> related patches and v2.0.2 userspace.
> It seems if I add a rule with either "--ip-sport" or "--ip-dport" options
> it goes into the rules absolutely fine.
> The problem occurs when I try to remove the rule:

The patch below should fix it (I've put the fix in the CVS repository too), 
I'll release a new version tonight.
Thanks for the report.

-- 
cheers,
Bart

--- extensions/ebt_ip.c.old	Tue Apr  1 09:40:30 2003
+++ extensions/ebt_ip.c	Tue Apr  1 09:39:24 2003
@@ -443,11 +443,13 @@
 			return 0;
 	}
 	if (ipinfo1->bitmask & EBT_IP_SPORT) {
-		if (ipinfo1->sport != ipinfo2->sport)
+		if (ipinfo1->sport[0] != ipinfo2->sport[0] ||
+		   ipinfo1->sport[1] != ipinfo2->sport[1])
 			return 0;
 	}
 	if (ipinfo1->bitmask & EBT_IP_DPORT) {
-		if (ipinfo1->dport != ipinfo2->dport)
+		if (ipinfo1->dport[0] != ipinfo2->dport[0] ||
+		   ipinfo1->dport[1] != ipinfo2->dport[1])
 			return 0;
 	}
 	return 1;



-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.