diff options
author | Shyam Prasad N <sprasad@microsoft.com> | 2023-06-09 20:46:59 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2023-06-12 04:52:49 +0300 |
commit | 2991b77409891e14a10b96899755c004b0c07edb (patch) | |
tree | 1d9ef63e10104e72db55b330c6e4a923f090f504 /fs/smb/client/cifsproto.h | |
parent | 50e63d6db6fd30a6dd9a33c49aa5b0bba36e1a92 (diff) | |
download | linux-2991b77409891e14a10b96899755c004b0c07edb.tar.xz |
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>
Diffstat (limited to 'fs/smb/client/cifsproto.h')
-rw-r--r-- | fs/smb/client/cifsproto.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/smb/client/cifsproto.h b/fs/smb/client/cifsproto.h index c1c704990b98..d127aded2f28 100644 --- a/fs/smb/client/cifsproto.h +++ b/fs/smb/client/cifsproto.h @@ -87,6 +87,7 @@ extern int cifs_handle_standard(struct TCP_Server_Info *server, struct mid_q_entry *mid); extern int smb3_parse_devname(const char *devname, struct smb3_fs_context *ctx); extern int smb3_parse_opt(const char *options, const char *key, char **val); +extern int cifs_ipaddr_cmp(struct sockaddr *srcaddr, struct sockaddr *rhs); extern bool cifs_match_ipaddr(struct sockaddr *srcaddr, struct sockaddr *rhs); extern int cifs_discard_remaining_data(struct TCP_Server_Info *server); extern int cifs_call_async(struct TCP_Server_Info *server, |