aboutsummaryrefslogtreecommitdiffstats
path: root/net/l2tp
diff options
context:
space:
mode:
authorGuillaume Nault <g.nault@alphalink.fr>2015-12-29 07:06:59 -0500
committerDavid S. Miller <davem@davemloft.net>2016-01-04 16:45:24 -0500
commit98f40b3e22aed519bc545ba3cc7d884ede9428c9 (patch)
tree28e634b6da2bc2be941ecfaaa839f6e593d7bf9d /net/l2tp
parent04c67a90ab947560564f875033f0e06ddfa0c7af (diff)
l2tp: rely on ppp layer for skb scrubbing
Since 79c441ae505c ("ppp: implement x-netns support"), the PPP layer calls skb_scrub_packet() whenever the skb is received on the PPP device. Manually resetting packet meta-data in the L2TP layer is thus redundant. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/l2tp')
-rw-r--r--net/l2tp/l2tp_ppp.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c
index d93f113cb522..652c250b9a3b 100644
--- a/net/l2tp/l2tp_ppp.c
+++ b/net/l2tp/l2tp_ppp.c
@@ -230,26 +230,11 @@ static void pppol2tp_recv(struct l2tp_session *session, struct sk_buff *skb, int
230 230
231 if (sk->sk_state & PPPOX_BOUND) { 231 if (sk->sk_state & PPPOX_BOUND) {
232 struct pppox_sock *po; 232 struct pppox_sock *po;
233
233 l2tp_dbg(session, PPPOL2TP_MSG_DATA, 234 l2tp_dbg(session, PPPOL2TP_MSG_DATA,
234 "%s: recv %d byte data frame, passing to ppp\n", 235 "%s: recv %d byte data frame, passing to ppp\n",
235 session->name, data_len); 236 session->name, data_len);
236 237
237 /* We need to forget all info related to the L2TP packet
238 * gathered in the skb as we are going to reuse the same
239 * skb for the inner packet.
240 * Namely we need to:
241 * - reset xfrm (IPSec) information as it applies to
242 * the outer L2TP packet and not to the inner one
243 * - release the dst to force a route lookup on the inner
244 * IP packet since skb->dst currently points to the dst
245 * of the UDP tunnel
246 * - reset netfilter information as it doesn't apply
247 * to the inner packet either
248 */
249 secpath_reset(skb);
250 skb_dst_drop(skb);
251 nf_reset(skb);
252
253 po = pppox_sk(sk); 238 po = pppox_sk(sk);
254 ppp_input(&po->chan, skb); 239 ppp_input(&po->chan, skb);
255 } else { 240 } else {