Skip to content

Commit 6631463

Browse files
q2venPaolo Abeni
authored andcommitted
llc: Don't drop packet from non-root netns.
Now these upper layer protocol handlers can be called from llc_rcv() as sap->rcv_func(), which is registered by llc_sap_open(). * function which is passed to register_8022_client() -> no in-kernel user calls register_8022_client(). * snap_rcv() `- proto->rcvfunc() : registered by register_snap_client() -> aarp_rcv() and atalk_rcv() drop packets from non-root netns * stp_pdu_rcv() `- garp_protos[]->rcv() : registered by stp_proto_register() -> garp_pdu_rcv() and br_stp_rcv() are netns-aware So, we can safely remove the netns restriction in llc_rcv(). Fixes: e730c15 ("[NET]: Make packet reception network namespace safe") Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent 97b1d32 commit 6631463

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

net/llc/llc_input.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,6 @@ int llc_rcv(struct sk_buff *skb, struct net_device *dev,
163163
void (*sta_handler)(struct sk_buff *skb);
164164
void (*sap_handler)(struct llc_sap *sap, struct sk_buff *skb);
165165

166-
if (!net_eq(dev_net(dev), &init_net))
167-
goto drop;
168-
169166
/*
170167
* When the interface is in promisc. mode, drop all the crap that it
171168
* receives, do not try to analyse it.

0 commit comments

Comments
 (0)