]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv6/ipv6_sockglue.c
[PATCH] csa: Extended system accounting over taskstats
[linux-2.6-omap-h63xx.git] / net / ipv6 / ipv6_sockglue.c
index a5eaaf693abf7dad7c3e320f775bafa0f4be631b..de6b91981b30611b0cd63ea8d14a304b34387c27 100644 (file)
@@ -123,6 +123,9 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb, int features)
        struct ipv6hdr *ipv6h;
        struct inet6_protocol *ops;
 
+       if (!(features & NETIF_F_HW_CSUM))
+               features &= ~NETIF_F_SG;
+
        if (unlikely(skb_shinfo(skb)->gso_type &
                     ~(SKB_GSO_UDP |
                       SKB_GSO_DODGY |
@@ -407,8 +410,16 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
                /* routing header option needs extra check */
                if (optname == IPV6_RTHDR && opt->srcrt) {
                        struct ipv6_rt_hdr *rthdr = opt->srcrt;
-                       if (rthdr->type)
+                       switch (rthdr->type) {
+                       case IPV6_SRCRT_TYPE_0:
+#ifdef CONFIG_IPV6_MIP6
+                       case IPV6_SRCRT_TYPE_2:
+#endif
+                               break;
+                       default:
                                goto sticky_done;
+                       }
+
                        if ((rthdr->hdrlen & 1) ||
                            (rthdr->hdrlen >> 1) != rthdr->segments_left)
                                goto sticky_done;