linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ipv6: silence log messages for locally generated multicast
@ 2008-12-08 12:25 Jan Sembera
  2008-12-09 23:48 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Sembera @ 2008-12-08 12:25 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel

This patch fixes minor annoyance during transmission of unsolicited
neighbor advertisements from userspace to multicast addresses (as
far as I can see in RFC, this is allowed and the similar functionality
for IPv4 has been in arping for a long time).

Outgoing multicast packets get reinserted into local processing as if they
are received from the network. The machine thus sees its own NA and fills
the logs with error messages. This patch removes the message if NA has been
generated locally.

Signed-off-by: Jan Sembera <jsembera@suse.cz>

diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 1724383..d0f54d1 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -912,8 +912,13 @@ static void ndisc_recv_na(struct sk_buff *skb)
 		   is invalid, but ndisc specs say nothing
 		   about it. It could be misconfiguration, or
 		   an smart proxy agent tries to help us :-)
+
+		   We should not print the error if NA has been
+		   received from loopback - it is just our own
+		   unsolicited advertisement.
 		 */
-		ND_PRINTK1(KERN_WARNING
+		if (skb->pkt_type != PACKET_LOOPBACK)
+			ND_PRINTK1(KERN_WARNING
 			   "ICMPv6 NA: someone advertises our address on %s!\n",
 			   ifp->idev->dev->name);
 		in6_ifa_put(ifp);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ipv6: silence log messages for locally generated multicast
  2008-12-08 12:25 [PATCH] ipv6: silence log messages for locally generated multicast Jan Sembera
@ 2008-12-09 23:48 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-12-09 23:48 UTC (permalink / raw)
  To: jsembera; +Cc: netdev, linux-kernel

From: Jan Sembera <jsembera@suse.cz>
Date: Mon, 8 Dec 2008 13:25:57 +0100

> This patch fixes minor annoyance during transmission of unsolicited
> neighbor advertisements from userspace to multicast addresses (as
> far as I can see in RFC, this is allowed and the similar functionality
> for IPv4 has been in arping for a long time).
> 
> Outgoing multicast packets get reinserted into local processing as if they
> are received from the network. The machine thus sees its own NA and fills
> the logs with error messages. This patch removes the message if NA has been
> generated locally.
> 
> Signed-off-by: Jan Sembera <jsembera@suse.cz>

Patch applied, thanks Jan.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-09 23:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-08 12:25 [PATCH] ipv6: silence log messages for locally generated multicast Jan Sembera
2008-12-09 23:48 ` 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).