chelsio/chtls: correct netdevice for vlan interface

Check if netdevice is a vlan interface and find real vlan netdevice.

Fixes: cc35c88ae4 ("crypto : chtls - CPL handler definition")
Signed-off-by: Venkatesh Ellapu <venkatesh.e@chelsio.com>
Signed-off-by: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Vinay Kumar Yadav 2020-10-19 17:20:21 +05:30 committed by Jakub Kicinski
parent 0fb5f0160a
commit 81519d1f7d

View File

@ -1157,6 +1157,9 @@ static struct sock *chtls_recv_sock(struct sock *lsk,
ndev = n->dev;
if (!ndev)
goto free_dst;
if (is_vlan_dev(ndev))
ndev = vlan_dev_real_dev(ndev);
port_id = cxgb4_port_idx(ndev);
csk = chtls_sock_create(cdev);