Wei Yongjun <[EMAIL PROTECTED]> wrote:
>
> I also send the same mail several ago, and get no response. You
> patch is fine. But I think following code has no effect:
> 
> if (sk->sk_filter && skb->ip_summed != CHECKSUM_UNNECESSARY) {
> 
> It just let UDP datagrams with checksum error be added into  UDP receive
> queue, and then discard it. I think this can be used to capture a UDP

We normally postpone the checksum computation until the user does a
recv(2).  However, if there is a socket filter attached then we need
to verify the checksum right now because the socket filter will be
applied at the very next step.

So yes it does let UDP datagrams with checksum errors onto the UDP rcv
queue if there no socket filters attached, but this is intentional since 
we want to postpone the cost of checksum computation until the point when
we have to copy the data to user-space where it becomes much cheaper.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to