From patchwork Mon Dec 8 12:25:57 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Sembera X-Patchwork-Id: 12760 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.176.167]) by ozlabs.org (Postfix) with ESMTP id 6EC45DDED5 for ; Mon, 8 Dec 2008 23:26:07 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751948AbYLHM0A (ORCPT ); Mon, 8 Dec 2008 07:26:00 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751886AbYLHMZ7 (ORCPT ); Mon, 8 Dec 2008 07:25:59 -0500 Received: from styx.suse.cz ([82.119.242.94]:57573 "EHLO mail.suse.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751581AbYLHMZ7 (ORCPT ); Mon, 8 Dec 2008 07:25:59 -0500 Received: from alaris.suse.cz (alaris.suse.cz [10.20.1.239]) by mail.suse.cz (Postfix) with ESMTP id 5F0656280D1; Mon, 8 Dec 2008 13:25:58 +0100 (CET) Received: by alaris.suse.cz (Postfix, from userid 11010) id 162E61A943A; Mon, 8 Dec 2008 13:25:57 +0100 (CET) Date: Mon, 8 Dec 2008 13:25:57 +0100 From: Jan Sembera To: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH] ipv6: silence log messages for locally generated multicast Message-ID: <20081208122557.GB4498@alaris.suse.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-09) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- 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 --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);