Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-2.6-microblaze.git] / net / ipv4 / udp_offload.c
index cfc8726..b76c48e 100644 (file)
@@ -68,8 +68,8 @@ static struct sk_buff *__skb_udp_tunnel_segment(struct sk_buff *skb,
                                      (NETIF_F_HW_CSUM | NETIF_F_IP_CSUM))));
 
        features &= skb->dev->hw_enc_features;
-       /* CRC checksum can't be handled by HW when it's a UDP tunneling packet. */
-       features &= ~NETIF_F_SCTP_CRC;
+       if (need_csum)
+               features &= ~NETIF_F_SCTP_CRC;
 
        /* The only checksum offload we care about from here on out is the
         * outer one so strip the existing checksum feature flags and
@@ -519,7 +519,8 @@ struct sk_buff *udp_gro_receive(struct list_head *head, struct sk_buff *skb,
        if (skb->dev->features & NETIF_F_GRO_FRAGLIST)
                NAPI_GRO_CB(skb)->is_flist = sk ? !udp_sk(sk)->gro_enabled: 1;
 
-       if ((sk && udp_sk(sk)->gro_enabled) || NAPI_GRO_CB(skb)->is_flist) {
+       if ((!sk && (skb->dev->features & NETIF_F_GRO_UDP_FWD)) ||
+           (sk && udp_sk(sk)->gro_enabled) || NAPI_GRO_CB(skb)->is_flist) {
                pp = call_gro_receive(udp_gro_receive_segment, head, skb);
                return pp;
        }