netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] IP: Increment INADDRERRORS if routing for a packet is not successful
@ 2010-06-01 21:13 Christoph Lameter
  2010-06-01 22:07 ` Eric Dumazet
  0 siblings, 1 reply; 28+ messages in thread
From: Christoph Lameter @ 2010-06-01 21:13 UTC (permalink / raw)
  To: netdev; +Cc: Stephen Hemminger, David Miller

Something like this would have been very helpful during recent debugging
of multicast issues. Silent discards are bad.


If the kernel perceives that something is wrong with an incoming packet then the
IP stack currently silently discards packets. This makes it difficult to diagnose
problems with the network configurations (such as a misbehaving kernel
subsystem discarding multicast packets because the reverse path filter
does not like multicast subscriptions on the second NIC with rp_filter=1).

It is also necessary to know how many inbound packets are discarded to
assess networking issues in general with a NIC.

Signed-off-by: Christoph Lameter <cl@linux-foundation.org>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>

---
 net/ipv4/route.c |    3 +++
 1 file changed, 3 insertions(+)

Index: linux-2.6/net/ipv4/route.c
===================================================================
--- linux-2.6.orig/net/ipv4/route.c	2010-06-01 11:46:10.000000000 -0500
+++ linux-2.6/net/ipv4/route.c	2010-06-01 11:52:55.000000000 -0500
@@ -2981,6 +2981,9 @@ static int inet_rtm_getroute(struct sk_b
 		rt = skb_rtable(skb);
 		if (err == 0 && rt->u.dst.error)
 			err = -rt->u.dst.error;
+		if (err)
+			IP_INC_STATS_BH(dev_net(skb->dev),
+					IPSTATS_MIB_INADDRERRORS);
 	} else {
 		struct flowi fl = {
 			.nl_u = {



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

end of thread, other threads:[~2010-06-03 10:19 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-01 21:13 [PATCH] IP: Increment INADDRERRORS if routing for a packet is not successful Christoph Lameter
2010-06-01 22:07 ` Eric Dumazet
2010-06-01 22:23   ` David Miller
2010-06-02 15:27   ` Christoph Lameter
2010-06-02 15:29     ` David Miller
2010-06-02 15:32     ` Eric Dumazet
2010-06-02 16:12       ` Christoph Lameter
2010-06-02 16:19         ` David Miller
2010-06-02 16:27           ` Christoph Lameter
2010-06-02 16:33             ` Eric Dumazet
2010-06-02 16:49               ` Christoph Lameter
2010-06-02 17:12                 ` David Miller
2010-06-02 17:19                   ` Eric Dumazet
2010-06-02 17:41                     ` Neil Horman
2010-06-02 17:31                   ` David Miller
2010-06-02 17:46                     ` Eric Dumazet
2010-06-02 18:01                       ` Christoph Lameter
2010-06-02 18:41                         ` Eric Dumazet
2010-06-02 18:59                           ` Christoph Lameter
2010-06-02 19:25                             ` Eric Dumazet
2010-06-02 20:11                               ` Christoph Lameter
2010-06-02 22:05                                 ` [PATCH net-next-2.6] ipv4: add LINUX_MIB_IPRPFILTER snmp counter Eric Dumazet
2010-06-03 10:19                                   ` David Miller
2010-06-03  3:50                     ` [PATCH] IP: Increment INADDRERRORS if routing for a packet is not successful Bill Fink
2010-06-03  3:54                       ` Eric Dumazet
2010-06-03  4:56                         ` Bill Fink
2010-06-02 16:28         ` Eric Dumazet
2010-06-02 16:35           ` Christoph Lameter

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).