From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xin Long Subject: Re: [PATCH net] ipv6: set fc_protocol with 0 when rtm_protocol is RTPROT_REDIRECT Date: Tue, 1 Aug 2017 14:50:49 +1200 Message-ID: References: <9fcbffcb-4a14-764c-7fe4-2108b8944c17@gmail.com> <11af493f-1128-cae6-d1a3-0d3d962da269@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: network dev , davem , =?UTF-8?Q?Mantas_Mikul=C4=97nas?= To: David Ahern Return-path: Received: from mail-qk0-f175.google.com ([209.85.220.175]:33392 "EHLO mail-qk0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751799AbdHACuv (ORCPT ); Mon, 31 Jul 2017 22:50:51 -0400 Received: by mail-qk0-f175.google.com with SMTP id a77so2141501qkb.0 for ; Mon, 31 Jul 2017 19:50:50 -0700 (PDT) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Tue, Aug 1, 2017 at 2:01 PM, David Ahern wrote: > On 7/31/17 7:40 PM, Xin Long wrote: >> To respect the old code more, setting RTPROT_RA only when >> it's with the flag (ADDRCONF | DEFAULT | ROUTEINFO), >> shouldn't it be: > > Look at rtm_fill_info: > > if (rt->rt6i_flags & (RTF_DEFAULT | RTF_ROUTEINFO)) > rtm->rtm_protocol = RTPROT_RA; > > > If either flag is set the protocol should be RTPROT_RA and looking at > both places that seems correct to me. > ok, right