From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCHv2 net-next 1/2] route: add support for directed broadcast forwarding Date: Mon, 2 Jul 2018 09:05:37 -0600 Message-ID: References: <62ecbcf0c905dde3bfde51cd260e2f7c59e21028.1530512974.git.lucien.xin@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: davem@davemloft.net, Davide Caratti , idosch@idosch.org To: Xin Long , network dev Return-path: Received: from mail-pg0-f65.google.com ([74.125.83.65]:40774 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751443AbeGBPFl (ORCPT ); Mon, 2 Jul 2018 11:05:41 -0400 Received: by mail-pg0-f65.google.com with SMTP id x5-v6so406118pgp.7 for ; Mon, 02 Jul 2018 08:05:40 -0700 (PDT) In-Reply-To: <62ecbcf0c905dde3bfde51cd260e2f7c59e21028.1530512974.git.lucien.xin@gmail.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 7/2/18 12:30 AM, Xin Long wrote: > @@ -2143,6 +2149,10 @@ static int devinet_conf_proc(struct ctl_table *ctl, int write, > if ((new_value == 0) && (old_value != 0)) > rt_cache_flush(net); > > + if (i == IPV4_DEVCONF_BC_FORWARDING - 1 || > + new_value != old_value) > + rt_cache_flush(net); > + Shouldn't that be '&&' instead of '||' otherwise you are bumping the fib gen id any time the old and new values do not equal regardless of which setting is changed.