lkml.org 
[lkml]   [2007]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 15/33] Fix netpoll UDP input path
    -stable review patch.  If anyone has any objections, please let us know.

    ------------------
    From: Aubrey.Li <aubreylee@gmail.com>

    Netpoll UDP input handler needs to pull up the UDP headers
    and handle receive checksum offloading properly just like
    the normal UDP input path does else we get corrupted
    checksums.

    [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 <aubreylee@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    net/core/netpoll.c | 7 +++++++
    1 file changed, 7 insertions(+)

    --- 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 linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-04-26 19:03    [W:0.026 / U:30.996 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site