aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vxlan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/vxlan.c')
-rw-r--r--drivers/net/vxlan.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index e0995ffd046d..ade33ef82823 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1156,15 +1156,7 @@ static int vxlan_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
1156 if (!vs) 1156 if (!vs)
1157 goto drop; 1157 goto drop;
1158 1158
1159 /* If the NIC driver gave us an encapsulated packet 1159 skb_pop_rcv_encapsulation(skb);
1160 * with the encapsulation mark, the device checksummed it
1161 * for us. Otherwise force the upper layers to verify it.
1162 */
1163 if ((skb->ip_summed != CHECKSUM_UNNECESSARY && skb->ip_summed != CHECKSUM_PARTIAL) ||
1164 !skb->encapsulation)
1165 skb->ip_summed = CHECKSUM_NONE;
1166
1167 skb->encapsulation = 0;
1168 1160
1169 vs->rcv(vs, skb, vxh->vx_vni); 1161 vs->rcv(vs, skb, vxh->vx_vni);
1170 return 0; 1162 return 0;
@@ -1201,6 +1193,7 @@ static void vxlan_rcv(struct vxlan_sock *vs,
1201 skb_reset_mac_header(skb); 1193 skb_reset_mac_header(skb);
1202 skb_scrub_packet(skb, !net_eq(vxlan->net, dev_net(vxlan->dev))); 1194 skb_scrub_packet(skb, !net_eq(vxlan->net, dev_net(vxlan->dev)));
1203 skb->protocol = eth_type_trans(skb, vxlan->dev); 1195 skb->protocol = eth_type_trans(skb, vxlan->dev);
1196 skb_postpull_rcsum(skb, eth_hdr(skb), ETH_HLEN);
1204 1197
1205 /* Ignore packet loops (and multicast echo) */ 1198 /* Ignore packet loops (and multicast echo) */
1206 if (ether_addr_equal(eth_hdr(skb)->h_source, vxlan->dev->dev_addr)) 1199 if (ether_addr_equal(eth_hdr(skb)->h_source, vxlan->dev->dev_addr))