diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-30 20:49:23 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-31 01:24:51 +0200 |
commit | a86283ff462e73978eb6a95d7b3815184908d594 (patch) | |
tree | 69a7426a59da8da3b0e78d3c81e2106388475834 /src/device.c | |
parent | poly1305: mips: compute S on fly (diff) | |
download | wireguard-monolithic-historical-a86283ff462e73978eb6a95d7b3815184908d594.tar.xz wireguard-monolithic-historical-a86283ff462e73978eb6a95d7b3815184908d594.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/device.c | 2 |
1 files changed, 1 insertions, 1 deletions
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)) |