sock: fix error in sock_setsockopt()
[linux-2.6-microblaze.git] / net / ipv6 / sit.c
index e0a39b0..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);
        }