Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Guillaume Nault and committed by
David S. Miller
98f40b3e 04c67a90

+1 -16
+1 -16
net/l2tp/l2tp_ppp.c
··· 230 230 231 231 if (sk->sk_state & PPPOX_BOUND) { 232 232 struct pppox_sock *po; 233 + 233 234 l2tp_dbg(session, PPPOL2TP_MSG_DATA, 234 235 "%s: recv %d byte data frame, passing to ppp\n", 235 236 session->name, data_len); 236 - 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 237 253 238 po = pppox_sk(sk); 254 239 ppp_input(&po->chan, skb);