From 1749f443d79f01c6ae1512cff63a5e02cf5149c1 Mon Sep 17 00:00:00 2001 From: Arturo Borrero Date: Wed, 11 Mar 2015 18:55:03 +0100 Subject: ebtables-compat: fix rule deleting with -D in rules with no target Before this patch, rule deleting with -D produces segfault in rules with no target. Signed-off-by: Arturo Borrero Gonzalez Signed-off-by: Pablo Neira Ayuso --- iptables/nft-bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'iptables/nft-bridge.c') diff --git a/iptables/nft-bridge.c b/iptables/nft-bridge.c index c4f5db6d..9498600e 100644 --- a/iptables/nft-bridge.c +++ b/iptables/nft-bridge.c @@ -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; } -- cgit v1.2.3