diff options
author | Wei Dong <weid@nanjing-fnst.com> | 2006-08-31 18:24:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-08-31 18:24:48 -0400 |
commit | 0668b47205e42c04e9c1b594573be5a822ac7f09 (patch) | |
tree | efc844d3b50e37a0db4cc650c7b005911945e786 /net/ipv4 | |
parent | 5991c84421f3ea1e281954610a39e4993e5c39e4 (diff) |
[IPV4]: Fix SNMPv2 "ipFragFails" counter error
When I tested Linux kernel 2.6.17.7 about statistics
"ipFragFails",found that this counter couldn't increase correctly. The
criteria is RFC2011:
RFC2011
ipFragFails OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of IP datagrams that have been discarded because
they needed to be fragmented at this entity but could not
be, e.g., because their Don't Fragment flag was set."
::= { ip 18 }
When I send big IP packet to a router with DF bit set to 1 which need to
be fragmented, and router just sends an ICMP error message
ICMP_FRAG_NEEDED but no increments for this counter(in the function
ip_fragment).
Signed-off-by: Wei Dong <weid@nanjing-fnst.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/ip_output.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 4c20f5546893..a2ede167e045 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -440,6 +440,7 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*)) | |||
440 | iph = skb->nh.iph; | 440 | iph = skb->nh.iph; |
441 | 441 | ||
442 | if (unlikely((iph->frag_off & htons(IP_DF)) && !skb->local_df)) { | 442 | if (unlikely((iph->frag_off & htons(IP_DF)) && !skb->local_df)) { |
443 | IP_INC_STATS(IPSTATS_MIB_FRAGFAILS); | ||
443 | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, | 444 | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, |
444 | htonl(dst_mtu(&rt->u.dst))); | 445 | htonl(dst_mtu(&rt->u.dst))); |
445 | kfree_skb(skb); | 446 | kfree_skb(skb); |