From patchwork Wed Mar 11 17:55:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arturo Borrero X-Patchwork-Id: 449115 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 34F4F1400DD for ; Thu, 12 Mar 2015 04:55:14 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751622AbbCKRzN (ORCPT ); Wed, 11 Mar 2015 13:55:13 -0400 Received: from smtp3.cica.es ([150.214.5.190]:45831 "EHLO smtp.cica.es" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750858AbbCKRzM (ORCPT ); Wed, 11 Mar 2015 13:55:12 -0400 Received: from localhost (unknown [127.0.0.1]) by smtp.cica.es (Postfix) with ESMTP id 0F2A651F20D; Wed, 11 Mar 2015 17:55:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at cica.es Received: from smtp.cica.es ([127.0.0.1]) by localhost (mail.cica.es [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d27xQKDUn+PE; Wed, 11 Mar 2015 18:55:06 +0100 (CET) Received: from nfdev.cica.es (nfdev.cica.es [IPv6:2a00:9ac0:c1ca:31::220]) by smtp.cica.es (Postfix) with ESMTP id E26CE51F20A; Wed, 11 Mar 2015 18:55:05 +0100 (CET) Subject: [iptables PATCH 2/2] ebtables-compat: fix rule deleting with -D in rules with no target From: Arturo Borrero Gonzalez To: netfilter-devel@vger.kernel.org Cc: pablo@netfilter.org Date: Wed, 11 Mar 2015 18:55:03 +0100 Message-ID: <20150311175502.30898.36762.stgit@nfdev.cica.es> In-Reply-To: <20150311175457.30898.35962.stgit@nfdev.cica.es> References: <20150311175457.30898.35962.stgit@nfdev.cica.es> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Before this patch, rule deleting with -D produces segfault in rules with no target. Signed-off-by: Arturo Borrero Gonzalez --- iptables/nft-bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/iptables/nft-bridge.c b/iptables/nft-bridge.c index e3ab667..084dd58 100644 --- a/iptables/nft-bridge.c +++ b/iptables/nft-bridge.c @@ -619,7 +619,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; }