From patchwork Sun Apr 24 20:05:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Aring X-Patchwork-Id: 8921261 Return-Path: X-Original-To: patchwork-linux-wpan@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7084DBF29F for ; Sun, 24 Apr 2016 20:05:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6EA42201BB for ; Sun, 24 Apr 2016 20:05:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 50DF32010F for ; Sun, 24 Apr 2016 20:05:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753125AbcDXUFm (ORCPT ); Sun, 24 Apr 2016 16:05:42 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36577 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753117AbcDXUFl (ORCPT ); Sun, 24 Apr 2016 16:05:41 -0400 Received: by mail-wm0-f65.google.com with SMTP id w143so16362705wmw.3 for ; Sun, 24 Apr 2016 13:05:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=N46rn+7j0ua00RRurJyWZh4PQKn5UKuu+VKXF1P0XII=; b=dm3agUa3CTT7FnDHIY1W0oX7dY4rd0zBwdnKrWlgsLOj6mqap2JbwMIDLb7VS7rCkd xcJKu2uA5CdwvRuEl94KcucwhUtg2Ns4I1fpBzZ+6nnfRr7qslJPXp0gfDUQvm4LKHm0 wSKxCXZ9Rt/j2sOQPQEXOWaKn4s9ar3Yu9JJy0l7zTIQisl43zCPKYSqKnhQOn75NHUs X7lwDH5x2N+fiG8K/q7eCySRLe9gim9eM3FWyGNEl/UvcVM80QPjDJDYzcEoEY+d5puY He8nhNA3L3lF5u/lrxjUvy9OZViVnoKUSSqOZkhp9vreA/16stsQ0DkFCKu4DQBlRnJ2 PoMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=N46rn+7j0ua00RRurJyWZh4PQKn5UKuu+VKXF1P0XII=; b=Acn/yLDUzihRu+rOWvJbuFTaXvvx8C8OQvp6HnGIO0Cq3o/0i7wylstzKt2NuRc0Gc dWLnfCwUeSgDOOqYU5BjWFu28tW5WgeReIARrfpruqpBZmkpoOvEZOJFfqpD9ODTDQ16 T9T5uRFK9wzWP+xuXBIxHe/LBWR7agx0vDmdWRHHpbyIPvKcC4PjGvNshwvmsae9adGD EyX/iCaTpZUIaObQW490Q2rCSGPwjEHxv+yHAvgtYnrxnaF7hdWL3hVRRW56SG39cCXB 82Ri06U8Jjiv+Yh9RTH6tYKcFh/Maxjn4agC0foP9iM3X2QgxYY8KeTql/rWeniJAknn B7KA== X-Gm-Message-State: AOPr4FUd9stNFKs/Z6Agyoz0SIQlqgUu8Wep9vOjJj4iEguCc7EaqLcx03lWf+qvVpR7EQ== X-Received: by 10.194.16.8 with SMTP id b8mr30460746wjd.51.1461528339572; Sun, 24 Apr 2016 13:05:39 -0700 (PDT) Received: from omega (p20030064A9533B1FE2CB4EFFFE1BB546.dip0.t-ipconnect.de. [2003:64:a953:3b1f:e2cb:4eff:fe1b:b546]) by smtp.gmail.com with ESMTPSA id ju3sm13992443wjb.11.2016.04.24.13.05.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Apr 2016 13:05:39 -0700 (PDT) Date: Sun, 24 Apr 2016 22:05:30 +0200 From: Alexander Aring To: RIOT OS kernel developers Cc: linux-wpan@vger.kernel.org Subject: Re: [riot-devel] RIOT+ULAs: no router entry Message-ID: <20160424200528.GA27492@omega> References: <20160422102833.GA5671@omega> <7BCB9BD8-C255-458C-83F6-0F7FE69F5C7F@mlng.net> <20160422122816.GA6364@omega> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160422122816.GA6364@omega> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-wpan-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, On Fri, Apr 22, 2016 at 02:28:16PM +0200, Alexander Aring wrote: > On Fri, Apr 22, 2016 at 01:13:29PM +0200, smlng wrote: ... > > > > @Alex as you joined the discussion: I also have a question regarding the Linux side. I currently use Raspbian with shipped Linux-Kernel 4.1.19. I observed that Linux still does NS for link-local address via the nodes scoped multicast address, instead of using 6lo 'shortcut' by extracting LL/MAC-address from the link-local IP. Is this fixed in some recent version? > > > > There are currently pending patches for introducing neigh_ops, which is > a callback strucuture for send/recv NS/NA. After this is mainline it > should be easily to change this behaviour, or? What do you think? > See [3] - function "lowpan_ndisc_send_ns". > I think, I know what you mean. There is some NS with src as unspecified addr "::" and dest is some "multicast node scope". RFC 6775 says [0]: An unspecified source address MUST NOT be used in NS messages. Additional to the pending patches I added: This will not sending NS with "::" addresses as source address. However, it's a little bit ugly we should prevent to calling this callback when source address is "::". This patch should be fine at first but can maybe optimized in future. --- Also for processing NS the "::" seems to be different [1], "::" seems to valid (ARO will be ignored than but we don't support it so it's default ignored). :-) - Alex [0] https://tools.ietf.org/html/rfc6775#section-5.5.1 [1] https://tools.ietf.org/html/rfc6775#section-6.5 -- To unsubscribe from this list: send the line "unsubscribe linux-wpan" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/6lowpan/ndisc.c b/net/6lowpan/ndisc.c index d088295..c6207cd 100644 --- a/net/6lowpan/ndisc.c +++ b/net/6lowpan/ndisc.c @@ -386,8 +386,11 @@ static void lowpan_ndisc_send_ns(struct net_device *dev, saddr = &addr_buf; } + /* RFC6775: + * An unspecified source address MUST NOT be used in NS messages. + */ if (ipv6_addr_any(saddr)) - inc_opt = false; + return; if (inc_opt) { optlen += ndisc_opt_addr_space(dev, dev->addr_len); optlen += lowpan_ndisc_802154_short_addr_space(dev);