Quoting David Miller:
|
| Fix: Move the `UDP_INC_STATS_BH(UDP_MIB_INDATAGRAMS)' statement from
| udp_queue_rcv_skb to udp_recvmsg. Now InDatagrams only counts those
| datagrams which were really delivered (as per RFC 2013).
|
|
| Unfortunately this breaks NFS and
From: Gerrit Renker [EMAIL PROTECTED]
Date: Mon, 12 Jun 2006 07:02:45 +0100
This is clearly preferable - would it look like this:
csum_copy_err:
UDP_INC_STATS_BH(UDP_MIB_INERRORS);
UDP_DEC_STATS_BH(UDP_MIB_INDATAGRAMS); /* requires new macro */
skb_kill_datagram(sk, skb,
David Miller [EMAIL PROTECTED] wrote:
Probably a better way to handle this is to correct the
INDATAGRAMS value by decrementing it when we notice that
the checksum is incorrect in a deferred manner.
I think sunrpc should instead increment the appropriate counters directly
as otherwise
From: Herbert Xu [EMAIL PROTECTED]
Date: Mon, 12 Jun 2006 16:18:09 +1000
David Miller [EMAIL PROTECTED] wrote:
Probably a better way to handle this is to correct the
INDATAGRAMS value by decrementing it when we notice that
the checksum is incorrect in a deferred manner.
I think
The code below implements the discussed solution of decrementing
InDatagrams if a datagram fails the checksum within udp_recvmsg().
I have given it a quick test / build and checked the outcome against
previous results: I now obtained correct counter values, i.e. the application
counted exactly
On Sun, Jun 11, 2006 at 11:49:05PM -0700, David Miller wrote:
Yeah. Good point. But how much protocol internals do we want to
slide into the -data_ready() callbacks of such layers? That's ugly
and something we should try to avoid.
I agree with the objective of minimising the exposure of
From: Gerrit Renker [EMAIL PROTECTED]
Date: Tue, 6 Jun 2006 19:25:40 +0100
Fix: Move the `UDP_INC_STATS_BH(UDP_MIB_INDATAGRAMS)' statement from
udp_queue_rcv_skb to udp_recvmsg. Now InDatagrams only counts those
datagrams which were really delivered (as per RFC 2013).
This problem involves MIB counter inaccuracies triggered by
failed UDP checksums.
Problem: ip_local_deliver_finish calls udp_rcv, which calls
udp_queue_rcv_skb.
Unless the sk_filter is set, the checksum of the incoming
UDP datagram is not verified. If there are no