[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b5ddba180909020905p2dd209ay435c4e161a5d2057@mail.gmail.com>
Date: Wed, 2 Sep 2009 18:05:54 +0200
From: Hannes Eder <heder@...gle.com>
To: Jan Engelhardt <jengelh@...ozas.de>
Cc: Patrick McHardy <kaber@...sh.net>, lvs-devel@...r.kernel.org,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
netfilter-devel@...r.kernel.org,
Fabien Duchêne <mad_fab@...net.be>,
Jean-Luc Fortemaison <jl.fortemaison@...ouvain.be>,
Julian Anastasov <ja@....bg>,
Julius Volz <julius.volz@...il.com>,
Laurent Grawet <laurent.grawet@...ouvain.be>,
Simon Horman <horms@...ge.net.au>,
Wensong Zhang <wensong@...ux-vs.org>
Subject: Re: [PATCH 1/3] netfilter: xt_ipvs (netfilter matcher for IPVS)
On Wed, Sep 2, 2009 at 17:49, Jan Engelhardt<jengelh@...ozas.de> wrote:
>
> On Wednesday 2009-09-02 17:36, Patrick McHardy wrote:
>>>
>>> Nice, I'll use par->family.
>>>
>>> So in theory I do not even need a check like the following in the beginning?
>>>
>>> if (family != NFPROTO_IPV4
>>> #ifdef CONFIG_IP_VS_IPV6
>>> && family != NFPROTO_IPV6
>>> #endif
>>> ) {
>>> match = false;
>>> goto out;
>>> }
>>
>>With the AF_UNSPEC registration of your match, it might be used
>
> par->family always contains the NFPROTO of the invoking implementation,
> which can never be UNSPEC (except, in future, xtables2 ;-)
>
> par->match->family however may be UNSPEC if the module works that way.
> Which is why we have par->family.
>
I'll a check_entry function:
static bool ipvs_mt_check(const struct xt_mtchk_param *par)
{
if (par->family != NFPROTO_IPV4
#ifdef CONFIG_IP_VS_IPV6
&& par->family != NFPROTO_IPV6
#endif
)
return false;
return true;
}
and remove the runtime check in ipvs_mt.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists