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 15:00:53 +0100 Message-ID: <20180112140053.aqykalueijqrvisd@salvia> References: <1515761845-31323-1-git-send-email-eyal.birger@gmail.com> <1515761845-31323-2-git-send-email-eyal.birger@gmail.com> <20180112134156.6nd4c7uvkswgrpxc@salvia> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, Jamal Hadi Salim , coreteam@netfilter.org, shmulik@metanetworks.com, Eyal Birger To: Eyal Birger Return-path: Received: from mail.us.es ([193.147.175.20]:37098 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933582AbeALOA6 (ORCPT ); Fri, 12 Jan 2018 09:00:58 -0500 Received: from antivirus1-rhel7.int (unknown [192.168.2.11]) by mail.us.es (Postfix) with ESMTP id 34F0820A527 for ; Fri, 12 Jan 2018 15:00:57 +0100 (CET) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 262ECDA851 for ; Fri, 12 Jan 2018 15:00:57 +0100 (CET) Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Fri, Jan 12, 2018 at 03:56:21PM +0200, Eyal Birger wrote: > On Fri, Jan 12, 2018 at 3:41 PM, Pablo Neira Ayuso wrote: > > 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. > > Thanks for the suggestion - > Are you referring to act_ipt? it looks like it allows calling targets; > I couldn't find a classifier calling a netfilter matcher. Then, I'd suggest you extend that infrastructure to alllow to call matches, so we reduce the number of interdepencies between different subsystems.