]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
ebtables-compat: fix rule deleting with -D in rules with no target
authorArturo Borrero <arturo.borrero.glez@gmail.com>
Wed, 11 Mar 2015 17:55:03 +0000 (18:55 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 13 Mar 2015 11:14:40 +0000 (12:14 +0100)
Before this patch, rule deleting with -D produces segfault in rules
with no target.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
iptables/nft-bridge.c

index c4f5db6df74497569ccd5932838f489d9bf3b35c..9498600e673727ed9da64fd5becd1a4d98e30169 100644 (file)
@@ -620,7 +620,7 @@ static bool nft_bridge_rule_find(struct nft_family_ops *ops, struct nft_rule *r,
                return false;
        }
 
-       if (strcmp(cs->jumpto, this.jumpto) != 0) {
+       if (cs->jumpto != NULL && strcmp(cs->jumpto, this.jumpto) != 0) {
                DEBUGP("Different verdict\n");
                return false;
        }