From: Andreas Bardoutsos <bardoutsos@ceid.upatras.gr>
To: netdev <netdev@vger.kernel.org>
Cc: linux-wpan@vger.kernel.org, Michael Richardson <mcr@sandelman.ca>,
Unstrung Hackers <unstrung-hackers@lists.sandelman.ca>,
netdev-owner@vger.kernel.org, linux-bluetooth@vger.kernel.org
Subject: [RFC net-next] ipv6: ext_header: add function to handle RPL extension header option 0x63
Date: Thu, 04 May 2017 17:17:18 +0200 [thread overview]
Message-ID: <dca567582f1979384fb1f3c3d1411349@ceid.upatras.gr> (raw)
Signed-off-by: Andreas Bardoutsos <bardoutsos@ceid.upatras.gr>
---
Hi all!
I have added a dump function(always return true) to recognise RPL
extension header(RFC6553)
Otherwise packet was dropped by kernel resulting in failing
communication in RPL DAG's between
linux running border routers and devices in the graph.For example
communication
with contiki OS running devices was previously impossible.
include/uapi/linux/in6.h | 1 +
net/ipv6/exthdrs.c | 13 +++++++++++++
2 files changed, 14 insertions(+)
diff --git a/include/uapi/linux/in6.h b/include/uapi/linux/in6.h
index 46444f8fbee4..5cc12d309dfe 100644
--- a/include/uapi/linux/in6.h
+++ b/include/uapi/linux/in6.h
@@ -146,6 +146,7 @@ struct in6_flowlabel_req {
#define IPV6_TLV_CALIPSO 7 /* RFC 5570 */
#define IPV6_TLV_JUMBO 194
#define IPV6_TLV_HAO 201 /* home address option */
+#define IPV6_TLV_RPL 99 /* RFC 6553 */
/*
* IPV6 socket options
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
index b636f1da9aec..82ed60d3180e 100644
--- a/net/ipv6/exthdrs.c
+++ b/net/ipv6/exthdrs.c
@@ -785,6 +785,15 @@ static bool ipv6_hop_calipso(struct sk_buff *skb,
int optoff)
return false;
}
+/* RPL RFC 6553 */
+
+static bool ipv6_hop_rpl(struct sk_buff *skb, int optoff)
+{
+ /*Dump function which always return true
+ *when rpl option is detected*/
+ return true;
+}
+
static const struct tlvtype_proc tlvprochopopt_lst[] = {
{
.type = IPV6_TLV_ROUTERALERT,
@@ -798,6 +807,10 @@ static const struct tlvtype_proc
tlvprochopopt_lst[] = {
.type = IPV6_TLV_CALIPSO,
.func = ipv6_hop_calipso,
},
+ {
+ .type = IPV6_TLV_RPL,
+ .func = ipv6_hop_rpl,
+ },
{ -1, }
};
next reply other threads:[~2017-05-04 15:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-04 15:17 Andreas Bardoutsos [this message]
2017-05-04 16:00 ` [RFC net-next] ipv6: ext_header: add function to handle RPL extension header option 0x63 Jiri Pirko
[not found] ` <CAAK7Ti9iFFqM7vMyveNfaNeCi6PmAGptXdTYgEzh2gsMptqi4w@mail.gmail.com>
2017-05-05 7:55 ` [Unstrung-hackers] " Andreas Bardoutsos
2017-05-06 10:37 ` Jiri Pirko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dca567582f1979384fb1f3c3d1411349@ceid.upatras.gr \
--to=bardoutsos@ceid.upatras.gr \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=mcr@sandelman.ca \
--cc=netdev-owner@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=unstrung-hackers@lists.sandelman.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox