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

Configure Feed

Select the types of activity you want to include in your feed.

pppoe: drop PACKET_OTHERHOST before skb_share_check()

Align with ip_rcv() by dropping PACKET_OTHERHOST packets before
calling skb_share_check(). This avoids unnecessary skb processing
for packets that will be discarded anyway.

Signed-off-by: Qingfang Deng <dqfext@gmail.com>
Acked-by: Guillaume Nault <gnault@redhat.com>
Link: https://patch.msgid.link/20250623033431.408810-1-dqfext@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Qingfang Deng and committed by
Jakub Kicinski
7eebd219 c9e78afa

+3 -3
+3 -3
drivers/net/ppp/pppoe.c
··· 372 372 * can't change. 373 373 */ 374 374 375 - if (skb->pkt_type == PACKET_OTHERHOST) 376 - goto abort_kfree; 377 - 378 375 if (sk->sk_state & PPPOX_BOUND) { 379 376 ppp_input(&po->chan, skb); 380 377 } else if (sk->sk_state & PPPOX_RELAY) { ··· 414 417 struct pppox_sock *po; 415 418 struct pppoe_net *pn; 416 419 int len; 420 + 421 + if (skb->pkt_type == PACKET_OTHERHOST) 422 + goto drop; 417 423 418 424 skb = skb_share_check(skb, GFP_ATOMIC); 419 425 if (!skb)