From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 226A4C0650F for ; Sat, 3 Aug 2019 00:29:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0235320880 for ; Sat, 3 Aug 2019 00:29:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392575AbfHCA3o (ORCPT ); Fri, 2 Aug 2019 20:29:44 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:52538 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392478AbfHCA3o (ORCPT ); Fri, 2 Aug 2019 20:29:44 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::d71]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id C1DAD1264F78D; Fri, 2 Aug 2019 17:29:43 -0700 (PDT) Date: Fri, 02 Aug 2019 17:29:42 -0700 (PDT) Message-Id: <20190802.172942.1360727502972215986.davem@davemloft.net> To: suyj.fnst@cn.fujitsu.com Cc: kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net v3] net: ipv6: Fix a bug in ndisc_send_ns when netdev only has a global address From: David Miller In-Reply-To: <1564537972-76503-1-git-send-email-suyj.fnst@cn.fujitsu.com> References: <1564537972-76503-1-git-send-email-suyj.fnst@cn.fujitsu.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 02 Aug 2019 17:29:44 -0700 (PDT) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Su Yanjun Date: Wed, 31 Jul 2019 09:52:52 +0800 > When the egress interface does not have a link local address, it can > not communicate with other hosts. > > In RFC4861, 7.2.2 says > "If the source address of the packet prompting the solicitation is the > same as one of the addresses assigned to the outgoing interface, that > address SHOULD be placed in the IP Source Address of the outgoing > solicitation. Otherwise, any one of the addresses assigned to the > interface should be used." > > In this patch we try get a global address if we get ll address failed. > > Signed-off-by: Su Yanjun > --- > Changes since V2: > - Let banned_flags under the scope of its use. I do not want to apply this. The only situation where this can occur is when userland is managing the interface addresses and has failed to properly add a link local address. That is a failure by userspace to uphold it's responsibilites when it has taken over management of these issues, not a situation the kernel should handle. Sorry.