Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752689AbZIBPtl (ORCPT ); Wed, 2 Sep 2009 11:49:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751974AbZIBPtk (ORCPT ); Wed, 2 Sep 2009 11:49:40 -0400 Received: from sovereign.computergmbh.de ([85.214.69.204]:50870 "EHLO sovereign.computergmbh.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750848AbZIBPtj (ORCPT ); Wed, 2 Sep 2009 11:49:39 -0400 Date: Wed, 2 Sep 2009 17:49:40 +0200 (CEST) From: Jan Engelhardt To: Patrick McHardy cc: Hannes Eder , lvs-devel@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, =?UTF-8?Q?Fabien_Duch=C3=AAne?= , Jean-Luc Fortemaison , Julian Anastasov , Julius Volz , Laurent Grawet , Simon Horman , Wensong Zhang Subject: Re: [PATCH 1/3] netfilter: xt_ipvs (netfilter matcher for IPVS) In-Reply-To: <4A9E90E4.9080805@trash.net> Message-ID: References: <20090902101417.11561.45663.stgit@jazzy.zrh.corp.google.com> <20090902101527.11561.59498.stgit@jazzy.zrh.corp.google.com> <4A9E8711.1070807@trash.net> <4A9E90E4.9080805@trash.net> User-Agent: Alpine 2.00 (LSU 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 881 Lines: 28 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/