]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
_really_ sort only user defined chains (Robert de Barth <list-netfilter@debarth.co.uk>
authorRobert de Barth <list-netfilter@debarth.co.uk>
Sun, 31 Jul 2005 07:04:59 +0000 (07:04 +0000)
committerHarald Welte <laforge@gnumonks.org>
Sun, 31 Jul 2005 07:04:59 +0000 (07:04 +0000)
libiptc/libiptc.c

index 7546d87b4eef711424859c4d222e50e8a54de1c2..452ac134af899e5c92612fb86a52f1a4fdf97bb2 100644 (file)
@@ -399,7 +399,7 @@ static inline void iptc_insert_chain(TC_HANDLE_T h, struct chain_head *c)
        /* sort only user defined chains */
        if (!c->hooknum) {
                list_for_each_entry(tmp, &h->chains, list) {
-                       if (strcmp(c->name, tmp->name) <= 0) {
+                       if (!tmp->hooknum && strcmp(c->name, tmp->name) <= 0) {
                                list_add(&c->list, tmp->list.prev);
                                return;
                        }