diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-15 22:37:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-15 22:37:03 -0400 |
commit | a9be22425e767d936105679fdc9f568b97bd47cf (patch) | |
tree | 37a63136da83dcf272668462f96eed1e96f37de3 /drivers | |
parent | dd1845af24a47b70cf84c29126698884f740ff9c (diff) | |
parent | b58537a1f5629bdc98a8b9dc2051ce0e952f6b4b (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:
1) Fix checksumming regressions, from Tom Herbert.
2) Undo unintentional permissions changes for SCTP rto_alpha and
rto_beta sysfs knobs, from Denial Borkmann.
3) VXLAN, like other IP tunnels, should advertize it's encapsulation
size using dev->needed_headroom instead of dev->hard_header_len.
From Cong Wang.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
net: sctp: fix permissions for rto_alpha and rto_beta knobs
vxlan: Checksum fixes
net: add skb_pop_rcv_encapsulation
udp: call __skb_checksum_complete when doing full checksum
net: Fix save software checksum complete
net: Fix GSO constants to match NETIF flags
udp: ipv4: do not waste time in __udp4_lib_mcast_demux_lookup
vxlan: use dev->needed_headroom instead of dev->hard_header_len
MAINTAINERS: update cxgb4 maintainer
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/vxlan.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 1610d51dbb5c..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)) |
@@ -2247,9 +2240,9 @@ static void vxlan_setup(struct net_device *dev) | |||
2247 | eth_hw_addr_random(dev); | 2240 | eth_hw_addr_random(dev); |
2248 | ether_setup(dev); | 2241 | ether_setup(dev); |
2249 | if (vxlan->default_dst.remote_ip.sa.sa_family == AF_INET6) | 2242 | if (vxlan->default_dst.remote_ip.sa.sa_family == AF_INET6) |
2250 | dev->hard_header_len = ETH_HLEN + VXLAN6_HEADROOM; | 2243 | dev->needed_headroom = ETH_HLEN + VXLAN6_HEADROOM; |
2251 | else | 2244 | else |
2252 | dev->hard_header_len = ETH_HLEN + VXLAN_HEADROOM; | 2245 | dev->needed_headroom = ETH_HLEN + VXLAN_HEADROOM; |
2253 | 2246 | ||
2254 | dev->netdev_ops = &vxlan_netdev_ops; | 2247 | dev->netdev_ops = &vxlan_netdev_ops; |
2255 | dev->destructor = free_netdev; | 2248 | dev->destructor = free_netdev; |
@@ -2646,8 +2639,7 @@ static int vxlan_newlink(struct net *net, struct net_device *dev, | |||
2646 | if (!tb[IFLA_MTU]) | 2639 | if (!tb[IFLA_MTU]) |
2647 | dev->mtu = lowerdev->mtu - (use_ipv6 ? VXLAN6_HEADROOM : VXLAN_HEADROOM); | 2640 | dev->mtu = lowerdev->mtu - (use_ipv6 ? VXLAN6_HEADROOM : VXLAN_HEADROOM); |
2648 | 2641 | ||
2649 | /* update header length based on lower device */ | 2642 | dev->needed_headroom = lowerdev->hard_header_len + |
2650 | dev->hard_header_len = lowerdev->hard_header_len + | ||
2651 | (use_ipv6 ? VXLAN6_HEADROOM : VXLAN_HEADROOM); | 2643 | (use_ipv6 ? VXLAN6_HEADROOM : VXLAN_HEADROOM); |
2652 | } else if (use_ipv6) | 2644 | } else if (use_ipv6) |
2653 | vxlan->flags |= VXLAN_F_IPV6; | 2645 | vxlan->flags |= VXLAN_F_IPV6; |