summaryrefslogtreecommitdiffstats
path: root/include/net/ip6_tunnel.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2019-06-23 09:21:15 +0200
committerGreg Kroah-Hartman2019-06-23 09:21:15 +0200
commit58ee01007c9e00531c1280b2d99b49d29a5e9844 (patch)
treed1feb7102591a811b4458e2e209d476580ae3687 /include/net/ip6_tunnel.h
parentusb: clean up some of the computations in adu_read (diff)
parentLinux 5.2-rc6 (diff)
downloadkernel-qcow2-linux-58ee01007c9e00531c1280b2d99b49d29a5e9844.tar.gz
kernel-qcow2-linux-58ee01007c9e00531c1280b2d99b49d29a5e9844.tar.xz
kernel-qcow2-linux-58ee01007c9e00531c1280b2d99b49d29a5e9844.zip
Merge 5.2-rc6 into usb-next
We need the USB fixes in here too. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/net/ip6_tunnel.h')
-rw-r--r--include/net/ip6_tunnel.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/net/ip6_tunnel.h b/include/net/ip6_tunnel.h
index 69b4bcf880c9..028eaea1c854 100644
--- a/include/net/ip6_tunnel.h
+++ b/include/net/ip6_tunnel.h
@@ -158,9 +158,12 @@ static inline void ip6tunnel_xmit(struct sock *sk, struct sk_buff *skb,
memset(skb->cb, 0, sizeof(struct inet6_skb_parm));
pkt_len = skb->len - skb_inner_network_offset(skb);
err = ip6_local_out(dev_net(skb_dst(skb)->dev), sk, skb);
- if (unlikely(net_xmit_eval(err)))
- pkt_len = -1;
- iptunnel_xmit_stats(dev, pkt_len);
+
+ if (dev) {
+ if (unlikely(net_xmit_eval(err)))
+ pkt_len = -1;
+ iptunnel_xmit_stats(dev, pkt_len);
+ }
}
#endif
#endif