diff options
| author | Kuniyuki Iwashima <kuniyu@amazon.com> | 2023-07-18 10:41:51 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-08-11 11:45:26 +0200 |
| commit | e03426fef8bc75ed05b8797379c9326c1a118c6f (patch) | |
| tree | 25336ef59ed5e696d0aac0fcb5af3ca4cdd35b98 /net | |
| parent | 9386ddd88480a1b838c92ef1677a4768c8914505 (diff) | |
| download | linux-e03426fef8bc75ed05b8797379c9326c1a118c6f.tar.gz linux-e03426fef8bc75ed05b8797379c9326c1a118c6f.tar.bz2 linux-e03426fef8bc75ed05b8797379c9326c1a118c6f.zip | |
llc: Don't drop packet from non-root netns.
[ Upstream commit 6631463b6e6673916d2481f692938f393148aa82 ]
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: e730c15519d0 ("[NET]: Make packet reception network namespace safe")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
| -rw-r--r-- | net/llc/llc_input.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/net/llc/llc_input.c b/net/llc/llc_input.c index 82cb93f66b9b..f9e801cc50f5 100644 --- a/net/llc/llc_input.c +++ b/net/llc/llc_input.c @@ -162,9 +162,6 @@ int llc_rcv(struct sk_buff *skb, struct net_device *dev, void (*sta_handler)(struct sk_buff *skb); void (*sap_handler)(struct llc_sap *sap, struct sk_buff *skb); - if (!net_eq(dev_net(dev), &init_net)) - goto drop; - /* * When the interface is in promisc. mode, drop all the crap that it * receives, do not try to analyse it. |
