Commit:     5e7d7fa57323dfb48fb09464cf4542daa7ce8a72
Parent:     55569ce256ce29f4624f0007213432c1ed646584
Author:     Aubrey.Li <[EMAIL PROTECTED]>
AuthorDate: Tue Apr 17 12:40:20 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Tue Apr 17 13:13:26 2007 -0700

    [NET]: Fix UDP checksum issue in net poll mode.
    In net poll mode, the current checksum function doesn't consider the
    kind of packet which is padded to reach a specific minimum length. I
    believe that's the problem causing my test case failed. The following
    patch fixed this issue.
    Signed-off-by: Aubrey.Li <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
 net/core/netpoll.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index da10194..4581ece 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -471,6 +471,13 @@ int __netpoll_rx(struct sk_buff *skb)
        if (skb->len < len || len < iph->ihl*4)
                goto out;
+       /*
+        * Our transport medium may have padded the buffer out.
+        * Now We trim to the true length of the frame.
+        */
+       if (pskb_trim_rcsum(skb, len))
+               goto out;
        if (iph->protocol != IPPROTO_UDP)
                goto out;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to