linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / net / ipv6 / inet6_connection_sock.c
index bf49107..f8f3a37 100644 (file)
@@ -13,6 +13,7 @@
  *             2 of the License, or(at your option) any later version.
  */
 
+#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/in6.h>
 #include <linux/ipv6.h>
@@ -172,7 +173,6 @@ int inet6_csk_xmit(struct sk_buff *skb, int ipfragok)
 
                if (err) {
                        sk->sk_err_soft = -err;
-                       kfree_skb(skb);
                        return err;
                }
 
@@ -181,11 +181,12 @@ int inet6_csk_xmit(struct sk_buff *skb, int ipfragok)
 
                if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) {
                        sk->sk_route_caps = 0;
-                       kfree_skb(skb);
                        return err;
                }
 
-               __ip6_dst_store(sk, dst, NULL);
+               ip6_dst_store(sk, dst, NULL);
+               sk->sk_route_caps = dst->dev->features &
+                       ~(NETIF_F_IP_CSUM | NETIF_F_TSO);
        }
 
        skb->dst = dst_clone(dst);