SNMPv2 udpInDatagrams counter error
Subsystems (2)
This change does not effect to tcpdump, only let UDP filter can not received UDP datagrams with checksum error. It is not a good idea, but I think is the best way to resolve this problem. If you want to capture error UDP packet, you can used tcpdump.
Quoted 5 lines · Gerrit Renker
Hi,
| if (!sk->sk_filter && skb->ip_summed != CHECKSUM_UNNECESSARY) { | | IPv6 doesn't do this, so I think delete condition 'sk->sk_filter'
is
Quoted 3 lines
| better. Do you think so?
I think the
sk->sk_filteris there for a good reason. If you delete
it,
Quoted 1 line
that routine is forced to always compute UDP checksums, even if the
only
Quoted 6 lines
receiving application is a tcpdump process. I may be wrong here, but I think that deleting the
sk_filterstatement is not at a good idea.The other alternatives discussed (afaik) so far were:
1) Move the increment of
UDP_MIB_INDATAGRAMSfromudp_queue_rcv_skb()
to
Quoted 2 lines
udp_recvmsg()(first patch uploaded to
http://bugzilla.kernel.org/show_bug.cgi?id=6660). This was discussed:
not a
Quoted 4 lines
good idea, since in-kernel applications may use the
data_readyhandler rather thanudp_recvmsg().2) Decrement
UDP_MIB_INDATAGRAMSinudp_recvmsg()when the checksum
turns
Quoted 1 line
out to be wrong (second patch uploaded to above address). This would
be a
Quoted 1 line
fix to the problem you are stating, it also solves the problem of
missing
Quoted 2 lines
out the
data_readyhandlers in (1), and was suggested earlier on this mailing list.