From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Ayuso Subject: Re: [PATCH net-next 1/2] net: netfilter: export xt_policy match_policy_in() as xt_policy_match_policy_in() Date: Fri, 12 Jan 2018 14:41:56 +0100 Message-ID: <20180112134156.6nd4c7uvkswgrpxc@salvia> References: <1515761845-31323-1-git-send-email-eyal.birger@gmail.com> <1515761845-31323-2-git-send-email-eyal.birger@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, jhs@mojatatu.com, coreteam@netfilter.org, shmulik@metanetworks.com, Eyal Birger To: Eyal Birger Return-path: Received: from mail.us.es ([193.147.175.20]:59004 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933508AbeALNmB (ORCPT ); Fri, 12 Jan 2018 08:42:01 -0500 Received: from antivirus1-rhel7.int (unknown [192.168.2.11]) by mail.us.es (Postfix) with ESMTP id 50EA01C438A for ; Fri, 12 Jan 2018 14:41:59 +0100 (CET) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 423A0DA857 for ; Fri, 12 Jan 2018 14:41:59 +0100 (CET) Content-Disposition: inline In-Reply-To: <1515761845-31323-2-git-send-email-eyal.birger@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, Jan 12, 2018 at 02:57:24PM +0200, Eyal Birger wrote: > @@ -51,9 +52,9 @@ match_xfrm_state(const struct xfrm_state *x, const struct xt_policy_elem *e, > MATCH(reqid, x->props.reqid); > } > > -static int > -match_policy_in(const struct sk_buff *skb, const struct xt_policy_info *info, > - unsigned short family) > +int xt_policy_match_policy_in(const struct sk_buff *skb, > + const struct xt_policy_info *info, > + unsigned short family) > { > const struct xt_policy_elem *e; > const struct sec_path *sp = skb->sp; > @@ -80,10 +81,11 @@ match_policy_in(const struct sk_buff *skb, const struct xt_policy_info *info, > > return strict ? 1 : 0; > } > +EXPORT_SYMBOL_GPL(xt_policy_match_policy_in); If you just want to call xt_policy_match from tc, then you could use tc ipt infrastructure instead.