[netfilter-cvslog] r3756 - trunk/iptables/libiptc
kaber at netfilter.org
kaber at netfilter.org
Sat Mar 5 00:08:31 CET 2005
Author: kaber at netfilter.org
Date: 2005-03-05 00:08:30 +0100 (Sat, 05 Mar 2005)
New Revision: 3756
Modified:
trunk/iptables/libiptc/libiptc.c
Log:
Restore chain order (Olaf Rempel <razzor at kopf-tisch.de>)
Modified: trunk/iptables/libiptc/libiptc.c
===================================================================
--- trunk/iptables/libiptc/libiptc.c 2005-03-02 12:02:47 UTC (rev 3755)
+++ trunk/iptables/libiptc/libiptc.c 2005-03-04 23:08:30 UTC (rev 3756)
@@ -396,10 +396,13 @@
{
struct chain_head *tmp;
- list_for_each_entry(tmp, &h->chains, list) {
- if (strcmp(c->name, tmp->name) <= 0) {
- list_add(&c->list, tmp->list.prev);
- return;
+ /* sort only user defined chains */
+ if (!c->hooknum) {
+ list_for_each_entry(tmp, &h->chains, list) {
+ if (strcmp(c->name, tmp->name) <= 0) {
+ list_add(&c->list, tmp->list.prev);
+ return;
+ }
}
}
More information about the netfilter-cvslog
mailing list