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 | ef8eadf87b347f7740ae5366ad1ccf8b4e3415b6 (patch) | |
tree | 4ee366f8d0bb9f20c1d5b90a33a14209fa3ddf93 /src/device.c | |
parent | 9b204d0ebdb6706bb055ade6fa36d73c7a69ef0e (diff) |
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.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/device.c')
-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)) |