From patchwork Fri Mar 7 19:33:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giuseppe Longo X-Patchwork-Id: 328061 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 A885A2C00B9 for ; Sat, 8 Mar 2014 06:32:51 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752807AbaCGTcu (ORCPT ); Fri, 7 Mar 2014 14:32:50 -0500 Received: from mail-ea0-f179.google.com ([209.85.215.179]:45587 "EHLO mail-ea0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752466AbaCGTcs (ORCPT ); Fri, 7 Mar 2014 14:32:48 -0500 Received: by mail-ea0-f179.google.com with SMTP id q10so2513165ead.24 for ; Fri, 07 Mar 2014 11:32:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6q5es5/jn2oss4IUCmdjX2e4kDKqegJxXZ0xb9hXQOo=; b=k3Ow9gVZWJi/wVI2JHBkv/snR/2vAuwhIL4s3isq34sVcFb1R6Y2uZJ5d2XKVn1uTd i5CI1TLqKN/Uw4NtYvhZN6/z1ddaBox73NKyoI6wtNxdE6Lrv/vor5od+ya8LlHEsh5B 4Ka8E7cjviTHeIVef+hJXjavjTj2rMLoDnLIjs8/MVuA4O9Bi+508WbzPTIg15IDHkPK 6A26nucb4/bsMWczmwud8JNEOToXca+nOJHOPLMcMuMvCHScnrYziQ7pTL9XCpPlMyM6 mMl7dLoc33PIkm/U0RUvLHa965eAi/n+Cl79Mklbj+dvueErKDTNEw41e1DVhcw9Z4mY sGlA== X-Received: by 10.14.100.8 with SMTP id y8mr20884844eef.29.1394220767552; Fri, 07 Mar 2014 11:32:47 -0800 (PST) Received: from localhost.localdomain ([46.182.89.119]) by mx.google.com with ESMTPSA id l42sm10219746eew.19.2014.03.07.11.32.46 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Fri, 07 Mar 2014 11:32:47 -0800 (PST) From: Giuseppe Longo To: netfilter-devel@vger.kernel.org Cc: Giuseppe Longo Subject: [iptables 3/3] nft-shared: make compare_matches as public Date: Fri, 7 Mar 2014 20:33:25 +0100 Message-Id: <1394220805-18021-4-git-send-email-giuseppelng@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1394220805-18021-1-git-send-email-giuseppelng@gmail.com> References: <1394220805-18021-1-git-send-email-giuseppelng@gmail.com> Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org This permits to compare two xtables_ebt_entry's matches reusing compare_matches. Signed-off-by: Giuseppe Longo --- iptables/nft-shared.c | 4 ++-- iptables/nft-shared.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/iptables/nft-shared.c b/iptables/nft-shared.c index e2bc802..d59abd4 100644 --- a/iptables/nft-shared.c +++ b/iptables/nft-shared.c @@ -690,8 +690,8 @@ struct nft_family_ops *nft_family_ops_lookup(int family) return NULL; } -static bool -compare_matches(struct xtables_rule_match *mt1, struct xtables_rule_match *mt2) +bool compare_matches(struct xtables_rule_match *mt1, + struct xtables_rule_match *mt2) { struct xtables_rule_match *mp1; struct xtables_rule_match *mp2; diff --git a/iptables/nft-shared.h b/iptables/nft-shared.h index 145f19d..b80b7c0 100644 --- a/iptables/nft-shared.h +++ b/iptables/nft-shared.h @@ -128,6 +128,7 @@ struct nft_handle; bool nft_ipv46_rule_find(struct nft_family_ops *ops, struct nft_rule *r, struct iptables_command_state *cs); +bool compare_matches(struct xtables_rule_match *mt1, struct xtables_rule_match *mt2); bool compare_targets(struct xtables_target *tg1, struct xtables_target *tg2); struct addr_mask {