cifs: fix sockaddr comparison in iface_cmp
authorSteve French <stfrench@microsoft.com>
Fri, 16 Jun 2023 01:30:07 +0000 (20:30 -0500)
committerSteve French <stfrench@microsoft.com>
Fri, 16 Jun 2023 01:39:00 +0000 (20:39 -0500)
commit842544557f5fb20aa90f3dd03e9f0441ff31ac85
tree7edde6dad0d2b59b134c69f1adce22e03bd41d23
parent40acd384735c75ad09d9797aa38bb08e8defa323
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/cifs/cifsglob.h
fs/cifs/cifsproto.h
fs/cifs/connect.c
fs/cifs/smb2ops.c