Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7aa27238 authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller
Browse files

vxlan: handle skb_clone failure



If skb_clone fails if out of memory then just skip the fanout.

Problem was introduced in 3.10 with:
  commit 6681712d
  Author: David Stevens <dlstevens@us.ibm.com>
  Date:   Fri Mar 15 04:35:51 2013 +0000

    vxlan: generalize forwarding tables

Signed-off-by: default avatarStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 26a41ae6
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1161,10 +1161,12 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
		struct sk_buff *skb1;

		skb1 = skb_clone(skb, GFP_ATOMIC);
		if (skb1) {
			rc1 = vxlan_xmit_one(skb1, dev, rdst, did_rsc);
			if (rc == NETDEV_TX_OK)
				rc = rc1;
		}
	}

	rc1 = vxlan_xmit_one(skb, dev, rdst0, did_rsc);
	if (rc == NETDEV_TX_OK)