Source
97
97
if (unlikely(!pskb_may_pull(skb, nsh_len)))
98
98
goto out;
99
99
100
100
proto = tun_p_to_eth_p(nsh_hdr(skb)->np);
101
101
if (!proto)
102
102
goto out;
103
103
104
104
__skb_pull(skb, nsh_len);
105
105
106
106
skb_reset_mac_header(skb);
107
-
skb_reset_mac_len(skb);
107
+
skb->mac_len = proto == htons(ETH_P_TEB) ? ETH_HLEN : 0;
108
108
skb->protocol = proto;
109
109
110
110
features &= NETIF_F_SG;
111
111
segs = skb_mac_gso_segment(skb, features);
112
112
if (IS_ERR_OR_NULL(segs)) {
113
113
skb_gso_error_unwind(skb, htons(ETH_P_NSH), nsh_len,
114
114
skb->network_header - nhoff,
115
115
mac_len);
116
116
goto out;
117
117
}