sock: fix error in sock_setsockopt()
[linux-2.6-microblaze.git] / net / ipv6 / sit.c
index f7c8110..df5bea8 100644 (file)
@@ -710,6 +710,8 @@ static int ipip6_rcv(struct sk_buff *skb)
                 * old iph is no longer valid
                 */
                iph = (const struct iphdr *)skb_mac_header(skb);
+               skb_reset_mac_header(skb);
+
                err = IP_ECN_decapsulate(iph, skb);
                if (unlikely(err)) {
                        if (log_ecn_error)
@@ -780,6 +782,8 @@ static int sit_tunnel_rcv(struct sk_buff *skb, u8 ipproto)
                        tpi = &ipip_tpi;
                if (iptunnel_pull_header(skb, 0, tpi->proto, false))
                        goto drop;
+               skb_reset_mac_header(skb);
+
                return ip_tunnel_rcv(tunnel, skb, tpi, NULL, log_ecn_error);
        }
 
@@ -973,7 +977,7 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
        if (df) {
                mtu = dst_mtu(&rt->dst) - t_hlen;
 
-               if (mtu < 68) {
+               if (mtu < IPV4_MIN_MTU) {
                        dev->stats.collisions++;
                        ip_rt_put(rt);
                        goto tx_error;