chtls: Fix panic when route to peer not configured
authorAyush Sawal <ayush.sawal@chelsio.com>
Wed, 6 Jan 2021 04:29:08 +0000 (09:59 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Jan 2021 13:16:56 +0000 (14:16 +0100)
commit523cea39aab23f50b3d601bb88cb2fb6639e203b
tree893bf4fcf9eb8cc7a3e2f0e4a956d868e0b166bb
parent2702758d42a4b4a24530269ce8411b44b7be4c44
chtls: Fix panic when route to peer not configured

[ Upstream commit 5a5fac9966bb6d513198634b0b1357be7e8447d2 ]

If route to peer is not configured, we might get non tls
devices from dst_neigh_lookup() which is invalid, adding a
check to avoid it.

Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition")
Signed-off-by: Rohit Maheshwari <rohitm@chelsio.com>
Signed-off-by: Ayush Sawal <ayush.sawal@chelsio.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c