aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/cifs_spnego.c6
-rw-r--r--fs/cifs/connect.c4
2 files changed, 4 insertions, 6 deletions
diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c
index 0ab2fb5afef1..3fd3a9df043a 100644
--- a/fs/cifs/cifs_spnego.c
+++ b/fs/cifs/cifs_spnego.c
@@ -121,11 +121,9 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo)
121 121
122 /* add the server address */ 122 /* add the server address */
123 if (server->addr.sockAddr.sin_family == AF_INET) 123 if (server->addr.sockAddr.sin_family == AF_INET)
124 sprintf(dp, "ip4=" NIPQUAD_FMT, 124 sprintf(dp, "ip4=%pI4", &server->addr.sockAddr.sin_addr);
125 NIPQUAD(server->addr.sockAddr.sin_addr));
126 else if (server->addr.sockAddr.sin_family == AF_INET6) 125 else if (server->addr.sockAddr.sin_family == AF_INET6)
127 sprintf(dp, "ip6=" NIP6_SEQFMT, 126 sprintf(dp, "ip6=%pi6", &server->addr.sockAddr6.sin6_addr);
128 NIP6(server->addr.sockAddr6.sin6_addr));
129 else 127 else
130 goto out; 128 goto out;
131 129
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index c7d341714586..204bd1354360 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2228,8 +2228,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
2228 2228
2229 /* new SMB session uses our srvTcp ref */ 2229 /* new SMB session uses our srvTcp ref */
2230 pSesInfo->server = srvTcp; 2230 pSesInfo->server = srvTcp;
2231 sprintf(pSesInfo->serverName, "%u.%u.%u.%u", 2231 sprintf(pSesInfo->serverName, "%pI4",
2232 NIPQUAD(sin_server->sin_addr.s_addr)); 2232 &sin_server->sin_addr.s_addr);
2233 2233
2234 write_lock(&cifs_tcp_ses_lock); 2234 write_lock(&cifs_tcp_ses_lock);
2235 list_add(&pSesInfo->smb_ses_list, &srvTcp->smb_ses_list); 2235 list_add(&pSesInfo->smb_ses_list, &srvTcp->smb_ses_list);