netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: netdev@vger.kernel.org
Subject: Re: [PATCH] SNMPv2 udpInDatagrams counter error
Date: Mon, 31 Jul 2006 09:19:02 +0100	[thread overview]
Message-ID: <200607310919.02824@strip-the-willow> (raw)
In-Reply-To: <1154335874.3194.3.camel@LINE>

This has been raised earlier, cf. http://bugzilla.kernel.org/show_bug.cgi?id=6660

Wei Yongjun wrote:
|  When I send a UDP datagrams with checksum error to target, I found that:
|  Under IPv6, counter udpInErrors increased, but under IPv4 counter
|  udpInDatagrams increased. I lookup into the source code, and found that,
|  under IPv4 UDP datagrams with checksum error will be delivered to UDP
|  receive queue, but IPv6 does not. IPv4 delivered into UDP receive queue,
|  increased udpInDatagrams, then discard it before delivered to UDP user.
|  RFC said udpInDatagrams is the total number of UDP datagrams delivered
|  to UDP users, so udpInDatagrams should not be increased while UDP
|  datagrams with checksum error received.
|  
|  Refer to RFC2013:
|    udpInDatagrams OBJECT-TYPE
|        SYNTAX      Counter32
|        MAX-ACCESS  read-only
|        STATUS      current
|        DESCRIPTION
|                "The total number of UDP datagrams delivered to UDP
|  users."
|        ::= { udp 1 }
|  
|  Following is my patch:
|  
|  --- a/net/ipv4/udp.c	2006-07-31 09:33:45.392479344 -0400
|  +++ b/net/ipv4/udp.c	2006-07-31 09:34:26.430240656 -0400
|  @@ -1018,7 +1018,7 @@ static int udp_queue_rcv_skb(struct sock
|   		/* FALLTHROUGH -- it's a UDP Packet */
|   	}
|   
|  -	if (sk->sk_filter && skb->ip_summed != CHECKSUM_UNNECESSARY) {
|  +	if (skb->ip_summed != CHECKSUM_UNNECESSARY) {
|   		if (__udp_checksum_complete(skb)) {
|   			UDP_INC_STATS_BH(UDP_MIB_INERRORS);
|   			kfree_skb(skb);
|  
|  Signed-off-by: Wei Yongjun <yjwei@nanjing-fnst.com>
|  
|  
|  -
|  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
|  
|  

  reply	other threads:[~2006-07-31  8:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-31  8:51 [PATCH] SNMPv2 udpInDatagrams counter error Wei Yongjun
2006-07-31  8:19 ` Gerrit Renker [this message]
     [not found]   ` <075801c6b47d$08c49350$6004a8c0@WeiYongjun>
2006-07-31  8:57     ` Gerrit Renker
  -- strict thread matches above, loose matches on Subject: below --
2006-07-31 10:03 Wei Yongjun
2006-07-31 10:42 ` Herbert Xu
2006-07-31 11:21 Wei Yongjun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200607310919.02824@strip-the-willow \
    --to=gerrit@erg.abdn.ac.uk \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).