aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/pppol2tp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c
index 9fbb2eba9a06..5861ee9599a2 100644
--- a/drivers/net/pppol2tp.c
+++ b/drivers/net/pppol2tp.c
@@ -1180,7 +1180,8 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
1180 /* Calculate UDP checksum if configured to do so */ 1180 /* Calculate UDP checksum if configured to do so */
1181 if (sk_tun->sk_no_check == UDP_CSUM_NOXMIT) 1181 if (sk_tun->sk_no_check == UDP_CSUM_NOXMIT)
1182 skb->ip_summed = CHECKSUM_NONE; 1182 skb->ip_summed = CHECKSUM_NONE;
1183 else if (!(skb_dst(skb)->dev->features & NETIF_F_V4_CSUM)) { 1183 else if ((skb_dst(skb) && skb_dst(skb)->dev) &&
1184 (!(skb_dst(skb)->dev->features & NETIF_F_V4_CSUM))) {
1184 skb->ip_summed = CHECKSUM_COMPLETE; 1185 skb->ip_summed = CHECKSUM_COMPLETE;
1185 csum = skb_checksum(skb, 0, udp_len, 0); 1186 csum = skb_checksum(skb, 0, udp_len, 0);
1186 uh->check = csum_tcpudp_magic(inet->inet_saddr, 1187 uh->check = csum_tcpudp_magic(inet->inet_saddr,