diff mbox

[net-next] icmp6: Add new icmpv6 type for RPL control message

Message ID 1412591826-32037-1-git-send-email-simon.vincent@xsilon.com
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Simon Vincent Oct. 6, 2014, 10:37 a.m. UTC
IANA has defined a type value of 155 for RPL control messages.
We do nothing if we recieve one of these messages. This patch is to
avoid getting lots of icmpv6 unknown type messages when using RPL.

Signed-off-by: Simon Vincent <simon.vincent@xsilon.com>
---
 include/uapi/linux/icmpv6.h | 2 ++
 net/ipv6/icmp.c             | 1 +
 2 files changed, 3 insertions(+)

Comments

David Miller Oct. 6, 2014, 10:13 p.m. UTC | #1
From: Simon Vincent <simon.vincent@xsilon.com>
Date: Mon,  6 Oct 2014 11:37:06 +0100

> IANA has defined a type value of 155 for RPL control messages.
> We do nothing if we recieve one of these messages. This patch is to
> avoid getting lots of icmpv6 unknown type messages when using RPL.
> 
> Signed-off-by: Simon Vincent <simon.vincent@xsilon.com>

If we agree that pretty much our policy is that we treat as "known"
any ICMPv6 type assigned officially by IANA, then we should simply
add everything missing from the table at:

	http://www.iana.org/assignments/icmpv6-parameters/icmpv6-parameters.xhtml

Any objections?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Hannes Frederic Sowa Oct. 6, 2014, 11:53 p.m. UTC | #2
On Tue, Oct 7, 2014, at 00:13, David Miller wrote:
> From: Simon Vincent <simon.vincent@xsilon.com>
> Date: Mon,  6 Oct 2014 11:37:06 +0100
> 
> > IANA has defined a type value of 155 for RPL control messages.
> > We do nothing if we recieve one of these messages. This patch is to
> > avoid getting lots of icmpv6 unknown type messages when using RPL.
> > 
> > Signed-off-by: Simon Vincent <simon.vincent@xsilon.com>
> 
> If we agree that pretty much our policy is that we treat as "known"
> any ICMPv6 type assigned officially by IANA, then we should simply
> add everything missing from the table at:
> 
> 	http://www.iana.org/assignments/icmpv6-parameters/icmpv6-parameters.xhtml
> 
> Any objections?

Might be possible, but I would favor to get rid of the printk or move
the test for informational icmp notifications up.
Some of the type < 128 icmp (non-informal) packets we also report to
user space, so we cannot just add them to a blacklist.

Bye,
Hannes
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/uapi/linux/icmpv6.h b/include/uapi/linux/icmpv6.h
index 590beda..0d493c1 100644
--- a/include/uapi/linux/icmpv6.h
+++ b/include/uapi/linux/icmpv6.h
@@ -107,6 +107,8 @@  struct icmp6hdr {
 #define ICMPV6_MOBILE_PREFIX_SOL	146
 #define ICMPV6_MOBILE_PREFIX_ADV	147
 
+#define ICMPV6_RPL_CONTROL		155
+
 /*
  *	Codes for Destination Unreachable
  */
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 141e1f3..525ad3c 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -774,6 +774,7 @@  static int icmpv6_rcv(struct sk_buff *skb)
 	case ICMPV6_DHAAD_REPLY:
 	case ICMPV6_MOBILE_PREFIX_SOL:
 	case ICMPV6_MOBILE_PREFIX_ADV:
+	case ICMPV6_RPL_CONTROL:
 		break;
 
 	default: