From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick McHardy Subject: Re: xt_MARK useless line Date: Wed, 10 Jan 2007 16:42:35 +0100 Message-ID: <45A5096B.40509@trash.net> References: <20070107141557.GB13543@prithivi.gnumonks.org> <45A18EE8.5080909@snapgear.com> <45A47F66.2050603@trash.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: Harald Welte , Netfilter Developer Mailing List , Philip Craig Return-path: To: Jan Engelhardt In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-devel-bounces@lists.netfilter.org Errors-To: netfilter-devel-bounces@lists.netfilter.org List-Id: netfilter-devel.vger.kernel.org Jan Engelhardt wrote: > On Jan 10 2007 06:53, Patrick McHardy wrote: > >>I vote for removing this (also in CONNMARK, CONNSECMARK, ...). >> > > > Not everywhere, xt_CONNMARK has a place where: > > newmark = (*ctmark & ~markinfo->mask) | markinfo->mark; > if (newmark != *ctmark) { > *ctmark = newmark; > #if defined(CONFIG_IP_NF_CONNTRACK) || defined(CONFIG_IP_NF_CONNTRACK_MODULE) > ip_conntrack_event_cache(IPCT_MARK, *pskb); > #else > nf_conntrack_event_cache(IPCT_MARK, *pskb); > #endif > } > > Would it matter to call these cache functions it even if the mark did > not really change? Yes. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Remove unnecessary if() constructs before assignment. > Plus one spelling fix, one brace indent fix. Queued for 2.6.21 (without the spelling fix since that touched a totally unrelated file), thanks.