summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/chelsio/chtls
diff options
context:
space:
mode:
authorVinay Kumar Yadav <vinay.yadav@chelsio.com>2020-10-19 17:20:21 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-29 10:10:53 +0100
commit99b5b5fbf805f61f780284dd3ccfbd346d109653 (patch)
tree6d82b9cc1736d0fa173e8e68a5ee24281f9cd336 /drivers/crypto/chelsio/chtls
parent8227ff98c87af98dfec729eedc555318f7fa9ca1 (diff)
downloadlinux-stable-99b5b5fbf805f61f780284dd3ccfbd346d109653.tar.gz
linux-stable-99b5b5fbf805f61f780284dd3ccfbd346d109653.tar.bz2
linux-stable-99b5b5fbf805f61f780284dd3ccfbd346d109653.zip
chelsio/chtls: correct netdevice for vlan interface
[ Upstream commit 81519d1f7df7ed1bd5b1397540c8884438f57ae2 ] Check if netdevice is a vlan interface and find real vlan netdevice. Fixes: cc35c88ae4db ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/crypto/chelsio/chtls')
-rw-r--r--drivers/crypto/chelsio/chtls/chtls_cm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/crypto/chelsio/chtls/chtls_cm.c b/drivers/crypto/chelsio/chtls/chtls_cm.c
index 05520dccd906..2f9eceaf706d 100644
--- a/drivers/crypto/chelsio/chtls/chtls_cm.c
+++ b/drivers/crypto/chelsio/chtls/chtls_cm.c
@@ -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);