summaryrefslogtreecommitdiff
path: root/net/ipv4/geneve.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-04-14 19:44:14 (GMT)
committerDavid S. Miller <davem@davemloft.net>2015-04-14 19:44:14 (GMT)
commit87ffabb1f055e14e7d171c6599539a154d647904 (patch)
tree56f227c9cb668686ca5c2cd9a7ae188b74c0f2f2 /net/ipv4/geneve.c
parent5e0e0dc10a8be16239eae24ab775de60821eee2d (diff)
parentb50edd7812852d989f2ef09dcfc729690f54a42d (diff)
downloadlinux-87ffabb1f055e14e7d171c6599539a154d647904.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
The dwmac-socfpga.c conflict was a case of a bug fix overlapping changes in net-next to handle an error pointer differently. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/geneve.c')
-rw-r--r--net/ipv4/geneve.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/geneve.c b/net/ipv4/geneve.c
index b77f5e8..8986e63 100644
--- a/net/ipv4/geneve.c
+++ b/net/ipv4/geneve.c
@@ -113,10 +113,6 @@ int geneve_xmit_skb(struct geneve_sock *gs, struct rtable *rt,
int min_headroom;
int err;
- skb = udp_tunnel_handle_offloads(skb, csum);
- if (IS_ERR(skb))
- return PTR_ERR(skb);
-
min_headroom = LL_RESERVED_SPACE(rt->dst.dev) + rt->dst.header_len
+ GENEVE_BASE_HLEN + opt_len + sizeof(struct iphdr)
+ (skb_vlan_tag_present(skb) ? VLAN_HLEN : 0);
@@ -131,6 +127,10 @@ int geneve_xmit_skb(struct geneve_sock *gs, struct rtable *rt,
if (unlikely(!skb))
return -ENOMEM;
+ skb = udp_tunnel_handle_offloads(skb, csum);
+ if (IS_ERR(skb))
+ return PTR_ERR(skb);
+
gnvh = (struct genevehdr *)__skb_push(skb, sizeof(*gnvh) + opt_len);
geneve_build_header(gnvh, tun_flags, vni, opt_len, opt);