From patchwork Mon Dec 14 14:00:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Aring X-Patchwork-Id: 556514 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 4AEAE1402D9 for ; Tue, 15 Dec 2015 01:01:57 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=akd6ufHP; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932566AbbLNOBw (ORCPT ); Mon, 14 Dec 2015 09:01:52 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:35780 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752041AbbLNOBu (ORCPT ); Mon, 14 Dec 2015 09:01:50 -0500 Received: by mail-wm0-f51.google.com with SMTP id p66so45314075wmp.0; Mon, 14 Dec 2015 06:01:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Njxhes2bbyGRUfQCwtMkiukrBr30+o2hPNf0dtLr4Dw=; b=akd6ufHPguhVca6YgCDfA8MpsBrxYGQAR/r1Pqs3l5F/qmfd8aJxC822DwAYrjJgc9 9UsPjvgYFeCxKT7yVQAIvFLIGh33cq0hPNeHaofA6O26cBTMUaFZ34iaiXP1/sIzK0BT qVOwNRULGlGuXOiWG7vlD9YB4eMGXzQIN+C26WVgKK9evBlNGUSJIYGnYzn7I7vHKShq k4BTugOC+h1Ag/9yj53qEaH4PcfsUrgmt1uBjcXnWnLEdAK0T0GKGPQQm4mSzbJicNos S+23Wt36n9K4hIYE6OazcWWxEduTPACDjDYX+CJqYinL6K1Z764PuYzpSN7OGD5Hy+nQ p/zg== X-Received: by 10.194.23.162 with SMTP id n2mr28002039wjf.152.1450101709202; Mon, 14 Dec 2015 06:01:49 -0800 (PST) Received: from omega.localdomain (p20030064A9495027E2CB4EFFFE1BB546.dip0.t-ipconnect.de. [2003:64:a949:5027:e2cb:4eff:fe1b:b546]) by smtp.gmail.com with ESMTPSA id u139sm16248150wmu.22.2015.12.14.06.01.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Dec 2015 06:01:48 -0800 (PST) From: Alexander Aring To: linux-wpan@vger.kernel.org Cc: linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, kernel@pengutronix.de, mcr@sandelman.ca, lukasz.duda@nordicsemi.no, martin.gergeleit@hs-rm.de, Alexander Aring , "David S . Miller" , Alexey Kuznetsov , James Morris , Hideaki YOSHIFUJI , Patrick McHardy Subject: [RFCv4 bluetooth-next 2/2] ipv6: add 6co as icmpv6 userspace option Date: Mon, 14 Dec 2015 15:00:54 +0100 Message-Id: <1450101654-22633-3-git-send-email-alex.aring@gmail.com> X-Mailer: git-send-email 2.6.1 In-Reply-To: <1450101654-22633-1-git-send-email-alex.aring@gmail.com> References: <1450101654-22633-1-git-send-email-alex.aring@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This patch adds the 6LoWPAN Context Option (6CO) as userspace option to processing such options inside RA messages in userspace. Cc: David S. Miller Cc: Alexey Kuznetsov Cc: James Morris Cc: Hideaki YOSHIFUJI Cc: Patrick McHardy Signed-off-by: Alexander Aring --- include/net/ndisc.h | 1 + net/ipv6/ndisc.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/net/ndisc.h b/include/net/ndisc.h index 2d8edaa..944258d 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h @@ -35,6 +35,7 @@ enum { ND_OPT_ROUTE_INFO = 24, /* RFC4191 */ ND_OPT_RDNSS = 25, /* RFC5006 */ ND_OPT_DNSSL = 31, /* RFC6106 */ + ND_OPT_6CO = 34, /* RFC6775 */ __ND_OPT_MAX }; diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index d6161e1..bed154e 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@ -188,7 +188,8 @@ static struct nd_opt_hdr *ndisc_next_option(struct nd_opt_hdr *cur, static inline int ndisc_is_useropt(struct nd_opt_hdr *opt) { return opt->nd_opt_type == ND_OPT_RDNSS || - opt->nd_opt_type == ND_OPT_DNSSL; + opt->nd_opt_type == ND_OPT_DNSSL || + opt->nd_opt_type == ND_OPT_6CO; } static struct nd_opt_hdr *ndisc_next_useropt(struct nd_opt_hdr *cur,