aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vxlan.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-04-14 15:44:14 -0400
committerDavid S. Miller <davem@davemloft.net>2015-04-14 15:44:14 -0400
commit87ffabb1f055e14e7d171c6599539a154d647904 (patch)
tree56f227c9cb668686ca5c2cd9a7ae188b74c0f2f2 /drivers/net/vxlan.c
parent5e0e0dc10a8be16239eae24ab775de60821eee2d (diff)
parentb50edd7812852d989f2ef09dcfc729690f54a42d (diff)
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 'drivers/net/vxlan.c')
-rw-r--r--drivers/net/vxlan.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 577c9b071ad9..154116aafd0d 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1699,12 +1699,6 @@ static int vxlan6_xmit_skb(struct dst_entry *dst, struct sock *sk,
1699 } 1699 }
1700 } 1700 }
1701 1701
1702 skb = iptunnel_handle_offloads(skb, udp_sum, type);
1703 if (IS_ERR(skb)) {
1704 err = -EINVAL;
1705 goto err;
1706 }
1707
1708 skb_scrub_packet(skb, xnet); 1702 skb_scrub_packet(skb, xnet);
1709 1703
1710 min_headroom = LL_RESERVED_SPACE(dst->dev) + dst->header_len 1704 min_headroom = LL_RESERVED_SPACE(dst->dev) + dst->header_len
@@ -1724,6 +1718,12 @@ static int vxlan6_xmit_skb(struct dst_entry *dst, struct sock *sk,
1724 goto err; 1718 goto err;
1725 } 1719 }
1726 1720
1721 skb = iptunnel_handle_offloads(skb, udp_sum, type);
1722 if (IS_ERR(skb)) {
1723 err = -EINVAL;
1724 goto err;
1725 }
1726
1727 vxh = (struct vxlanhdr *) __skb_push(skb, sizeof(*vxh)); 1727 vxh = (struct vxlanhdr *) __skb_push(skb, sizeof(*vxh));
1728 vxh->vx_flags = htonl(VXLAN_HF_VNI); 1728 vxh->vx_flags = htonl(VXLAN_HF_VNI);
1729 vxh->vx_vni = md->vni; 1729 vxh->vx_vni = md->vni;
@@ -1784,10 +1784,6 @@ int vxlan_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *skb,
1784 } 1784 }
1785 } 1785 }
1786 1786
1787 skb = iptunnel_handle_offloads(skb, udp_sum, type);
1788 if (IS_ERR(skb))
1789 return PTR_ERR(skb);
1790
1791 min_headroom = LL_RESERVED_SPACE(rt->dst.dev) + rt->dst.header_len 1787 min_headroom = LL_RESERVED_SPACE(rt->dst.dev) + rt->dst.header_len
1792 + VXLAN_HLEN + sizeof(struct iphdr) 1788 + VXLAN_HLEN + sizeof(struct iphdr)
1793 + (skb_vlan_tag_present(skb) ? VLAN_HLEN : 0); 1789 + (skb_vlan_tag_present(skb) ? VLAN_HLEN : 0);
@@ -1803,6 +1799,10 @@ int vxlan_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *skb,
1803 if (WARN_ON(!skb)) 1799 if (WARN_ON(!skb))
1804 return -ENOMEM; 1800 return -ENOMEM;
1805 1801
1802 skb = iptunnel_handle_offloads(skb, udp_sum, type);
1803 if (IS_ERR(skb))
1804 return PTR_ERR(skb);
1805
1806 vxh = (struct vxlanhdr *) __skb_push(skb, sizeof(*vxh)); 1806 vxh = (struct vxlanhdr *) __skb_push(skb, sizeof(*vxh));
1807 vxh->vx_flags = htonl(VXLAN_HF_VNI); 1807 vxh->vx_flags = htonl(VXLAN_HF_VNI);
1808 vxh->vx_vni = md->vni; 1808 vxh->vx_vni = md->vni;