* [PATCH net-next] icmp6: Add new icmpv6 type for RPL control message
@ 2014-10-06 10:37 Simon Vincent
2014-10-06 22:13 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Simon Vincent @ 2014-10-06 10:37 UTC (permalink / raw)
To: netdev; +Cc: Simon Vincent
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(+)
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:
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] icmp6: Add new icmpv6 type for RPL control message
2014-10-06 10:37 [PATCH net-next] icmp6: Add new icmpv6 type for RPL control message Simon Vincent
@ 2014-10-06 22:13 ` David Miller
2014-10-06 23:53 ` Hannes Frederic Sowa
0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2014-10-06 22:13 UTC (permalink / raw)
To: simon.vincent; +Cc: netdev
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?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] icmp6: Add new icmpv6 type for RPL control message
2014-10-06 22:13 ` David Miller
@ 2014-10-06 23:53 ` Hannes Frederic Sowa
2014-10-07 19:55 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Hannes Frederic Sowa @ 2014-10-06 23:53 UTC (permalink / raw)
To: David Miller, simon.vincent; +Cc: netdev
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] icmp6: Add new icmpv6 type for RPL control message
2014-10-06 23:53 ` Hannes Frederic Sowa
@ 2014-10-07 19:55 ` David Miller
2014-10-07 20:26 ` Hannes Frederic Sowa
0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2014-10-07 19:55 UTC (permalink / raw)
To: hannes; +Cc: simon.vincent, netdev
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
Date: Tue, 07 Oct 2014 01:53:46 +0200
> 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.
So basically:
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 141e1f3..97ae700 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -777,12 +777,12 @@ static int icmpv6_rcv(struct sk_buff *skb)
break;
default:
- LIMIT_NETDEBUG(KERN_DEBUG "icmpv6: msg of unknown type\n");
-
/* informational */
if (type & ICMPV6_INFOMSG_MASK)
break;
+ LIMIT_NETDEBUG(KERN_DEBUG "icmpv6: msg of unknown type\n");
+
/*
* error of unknown type.
* must pass to upper level
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] icmp6: Add new icmpv6 type for RPL control message
2014-10-07 19:55 ` David Miller
@ 2014-10-07 20:26 ` Hannes Frederic Sowa
2014-10-07 20:35 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Hannes Frederic Sowa @ 2014-10-07 20:26 UTC (permalink / raw)
To: David Miller; +Cc: simon.vincent, netdev
On Di, 2014-10-07 at 15:55 -0400, David Miller wrote:
> From: Hannes Frederic Sowa <hannes@stressinduktion.org>
> Date: Tue, 07 Oct 2014 01:53:46 +0200
>
> > 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.
>
> So basically:
>
> diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
> index 141e1f3..97ae700 100644
> --- a/net/ipv6/icmp.c
> +++ b/net/ipv6/icmp.c
> @@ -777,12 +777,12 @@ static int icmpv6_rcv(struct sk_buff *skb)
> break;
>
> default:
> - LIMIT_NETDEBUG(KERN_DEBUG "icmpv6: msg of unknown type\n");
> -
> /* informational */
> if (type & ICMPV6_INFOMSG_MASK)
> break;
>
> + LIMIT_NETDEBUG(KERN_DEBUG "icmpv6: msg of unknown type\n");
> +
> /*
> * error of unknown type.
> * must pass to upper level
Yep, can you take care of this?
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Thanks! :)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] icmp6: Add new icmpv6 type for RPL control message
2014-10-07 20:26 ` Hannes Frederic Sowa
@ 2014-10-07 20:35 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2014-10-07 20:35 UTC (permalink / raw)
To: hannes; +Cc: simon.vincent, netdev
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
Date: Tue, 07 Oct 2014 22:26:30 +0200
> Yep, can you take care of this?
>
> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Of course, done.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-10-07 20:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-06 10:37 [PATCH net-next] icmp6: Add new icmpv6 type for RPL control message Simon Vincent
2014-10-06 22:13 ` David Miller
2014-10-06 23:53 ` Hannes Frederic Sowa
2014-10-07 19:55 ` David Miller
2014-10-07 20:26 ` Hannes Frederic Sowa
2014-10-07 20:35 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).