Re: Segfaults when adding rules to custom chains (2.0.8-rc2)

Bart De Schuymer <[email protected]>
Newsgroups gmane.linux.network.bridge.ebtables.devel
Message-ID <[email protected]>
Op wo, 26-07-2006 te 09:21 -0600, schreef Alberto Treviño:
> I am experiencing segfaults when trying to add rules to user-defined 
> chains in ebtables v2.0.8-rc2.  I saw some similar problems were fixed 
> between rc1 and rc2, but apparently some still exist.  I provide the 
> details further down.  I am using a custom-built system based on 
> DIY-Linux (www.diy-linux.org) using kernel 2.6.17.6, glibc 2.4 and GCC 
> 4.1.1 (definitely a bleeding-edge build).
> 
> Here are the details on reproducing the problem.  You create a new 
> chain, you add a rule to a default chain to jump to the new chain, then 
> you add a rule to the new chain.  Adding a new rule to the new chain 
> will segfault:

Hi,

Thanks for the report. The attached patch should solve your problem.
How to apply it: go to the source directory of ebtables, execute
'patch -p1 <file>' followed by make and make install (change <file> to
the file name of the saved patch). If you find more problems, don't
hesitate to report them...

cheers,
Bart

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Ebtables-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ebtables-devel
patch.diff (text/x-patch, 389 B)
--- ebtables-v2.0.8-rc2/libebtc.c.old	2006-07-28 21:58:44.000000000 +0200
+++ ebtables-v2.0.8-rc2/libebtc.c	2006-07-28 21:58:51.000000000 +0200
@@ -1033,7 +1033,7 @@ void ebt_check_for_loops(struct ebt_u_re
 			stack[sp].e = e;
 			sp++;
 			j = -1;
-			e = entries2->entries;
+			e = entries2->entries->next;
 			chain_nr = verdict + NF_BR_NUMHOOKS;
 			entries = entries2;
 			continue;
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.