cifs: fix sockaddr comparison in iface_cmp
authorShyam Prasad N <sprasad@microsoft.com>
Fri, 9 Jun 2023 17:46:59 +0000 (17:46 +0000)
committerSteve French <stfrench@microsoft.com>
Mon, 12 Jun 2023 01:52:49 +0000 (20:52 -0500)
commit2991b77409891e14a10b96899755c004b0c07edb
tree1d9ef63e10104e72db55b330c6e4a923f090f504
parent50e63d6db6fd30a6dd9a33c49aa5b0bba36e1a92
cifs: fix sockaddr comparison in iface_cmp

iface_cmp used to simply do a memcmp of the two
provided struct sockaddrs. The comparison needs to do more
based on the address family. Similar logic was already
present in cifs_match_ipaddr. Doing something similar now.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifsglob.h
fs/smb/client/cifsproto.h
fs/smb/client/connect.c
fs/smb/client/smb2ops.c