Re: ebtables segfault
Bart De Schuymer <[email protected]> Fri, 10 Nov 2006 21:32:51 +0100
| Newsgroups | gmane.linux.network.bridge.ebtables.user |
|---|---|
| Message-ID | <[email protected]> |
Op vr, 10-11-2006 te 16:51 +0100, schreef Lutz Jaenicke: > This issue is not yet fixed in CVS. It is caused by uninitialized > memory being used. > I have attached a patch that uses the num_chains as explicit end > condition. This patch seems to fix the problem (excessive tests > pending). The patch looks good, thanks. I'll apply an alternative fix to the cvs (see attachment). cheers, Bart ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Ebtables-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ebtables-user
patch.diff
(text/x-patch, 592 B)
--- ebtables-old.c 2006-11-10 21:28:51.000000000 +0100
+++ ebtables.c 2006-11-10 21:29:03.000000000 +0100
@@ -1176,16 +1176,15 @@ check_extension:
/* Do the final_check(), for all entries.
* This is needed when adding a rule that has a chain target */
i = -1;
- while (1) {
+ while (++i != replace->num_chains) {
struct ebt_u_entry *e;
- i++;
entries = replace->chains[i];
if (!entries) {
if (i < NF_BR_NUMHOOKS)
continue;
else
- break;
+ ebt_print_bug("whoops\n");
}
e = entries->entries->next;
while (e != entries->entries) {