aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pppol2tp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/pppol2tp.c')
-rw-r--r--drivers/net/pppol2tp.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c
index 5b07dd8e5c04..e7935d09c896 100644
--- a/drivers/net/pppol2tp.c
+++ b/drivers/net/pppol2tp.c
@@ -433,8 +433,7 @@ static void pppol2tp_recv_dequeue_skb(struct pppol2tp_session *session, struct s
433 * to the inner packet either 433 * to the inner packet either
434 */ 434 */
435 secpath_reset(skb); 435 secpath_reset(skb);
436 dst_release(skb->dst); 436 skb_dst_drop(skb);
437 skb->dst = NULL;
438 nf_reset(skb); 437 nf_reset(skb);
439 438
440 po = pppox_sk(session_sock); 439 po = pppox_sk(session_sock);
@@ -976,7 +975,7 @@ static int pppol2tp_sendmsg(struct kiocb *iocb, struct socket *sock, struct msgh
976 /* Calculate UDP checksum if configured to do so */ 975 /* Calculate UDP checksum if configured to do so */
977 if (sk_tun->sk_no_check == UDP_CSUM_NOXMIT) 976 if (sk_tun->sk_no_check == UDP_CSUM_NOXMIT)
978 skb->ip_summed = CHECKSUM_NONE; 977 skb->ip_summed = CHECKSUM_NONE;
979 else if (!(skb->dst->dev->features & NETIF_F_V4_CSUM)) { 978 else if (!(skb_dst(skb)->dev->features & NETIF_F_V4_CSUM)) {
980 skb->ip_summed = CHECKSUM_COMPLETE; 979 skb->ip_summed = CHECKSUM_COMPLETE;
981 csum = skb_checksum(skb, 0, udp_len, 0); 980 csum = skb_checksum(skb, 0, udp_len, 0);
982 uh->check = csum_tcpudp_magic(inet->saddr, inet->daddr, 981 uh->check = csum_tcpudp_magic(inet->saddr, inet->daddr,
@@ -1172,14 +1171,14 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
1172 nf_reset(skb); 1171 nf_reset(skb);
1173 1172
1174 /* Get routing info from the tunnel socket */ 1173 /* Get routing info from the tunnel socket */
1175 dst_release(skb->dst); 1174 skb_dst_drop(skb);
1176 skb->dst = dst_clone(__sk_dst_get(sk_tun)); 1175 skb_dst_set(skb, dst_clone(__sk_dst_get(sk_tun)));
1177 pppol2tp_skb_set_owner_w(skb, sk_tun); 1176 pppol2tp_skb_set_owner_w(skb, sk_tun);
1178 1177
1179 /* Calculate UDP checksum if configured to do so */ 1178 /* Calculate UDP checksum if configured to do so */
1180 if (sk_tun->sk_no_check == UDP_CSUM_NOXMIT) 1179 if (sk_tun->sk_no_check == UDP_CSUM_NOXMIT)
1181 skb->ip_summed = CHECKSUM_NONE; 1180 skb->ip_summed = CHECKSUM_NONE;
1182 else if (!(skb->dst->dev->features & NETIF_F_V4_CSUM)) { 1181 else if (!(skb_dst(skb)->dev->features & NETIF_F_V4_CSUM)) {
1183 skb->ip_summed = CHECKSUM_COMPLETE; 1182 skb->ip_summed = CHECKSUM_COMPLETE;
1184 csum = skb_checksum(skb, 0, udp_len, 0); 1183 csum = skb_checksum(skb, 0, udp_len, 0);
1185 uh->check = csum_tcpudp_magic(inet->saddr, inet->daddr, 1184 uh->check = csum_tcpudp_magic(inet->saddr, inet->daddr,
@@ -1238,8 +1237,7 @@ static void pppol2tp_tunnel_closeall(struct pppol2tp_tunnel *tunnel)
1238 struct pppol2tp_session *session; 1237 struct pppol2tp_session *session;
1239 struct sock *sk; 1238 struct sock *sk;
1240 1239
1241 if (tunnel == NULL) 1240 BUG_ON(tunnel == NULL);
1242 BUG();
1243 1241
1244 PRINTK(tunnel->debug, PPPOL2TP_MSG_CONTROL, KERN_INFO, 1242 PRINTK(tunnel->debug, PPPOL2TP_MSG_CONTROL, KERN_INFO,
1245 "%s: closing all sessions...\n", tunnel->name); 1243 "%s: closing all sessions...\n", tunnel->name);