From a86283ff462e73978eb6a95d7b3815184908d594 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 30 May 2018 20:49:23 +0200 Subject: device: do not assume dst is always valid The new flow offloading feature at the moment does not set the dst. We have a patch pending to fix this upstream, but in the meantime, work around it here. --- src/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device.c b/src/device.c index 88790d6..40b9e5c 100644 --- a/src/device.c +++ b/src/device.c @@ -143,7 +143,7 @@ static netdev_tx_t xmit(struct sk_buff *skb, struct net_device *dev) goto err_peer; } - mtu = dst_mtu(skb_dst(skb)); + mtu = skb_dst(skb) ? dst_mtu(skb_dst(skb)) : dev->mtu; __skb_queue_head_init(&packets); if (!skb_is_gso(skb)) -- cgit v1.2.3-59-g8ed1b