aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/dns_resolve.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2009-06-11 10:27:31 -0400
committerSteve French <sfrench@us.ibm.com>2009-06-24 21:14:36 -0400
commit681bf72e4893a187cf6b6b62c08fc193f81c8c2f (patch)
tree5c580474a21edf38140407bd42f28853e9354e25 /fs/cifs/dns_resolve.c
parent268875b9d1dd1bf0b523c59e736da9bc20c8ce1f (diff)
cifs: have cifs parse scope_id out of IPv6 addresses and use it
This patch has CIFS look for a '%' in an IPv6 address. If one is present then it will try to treat that value as a numeric interface index suitable for stuffing into the sin6_scope_id field. This should allow people to mount servers on IPv6 link-local addresses. Signed-off-by: Jeff Layton <jlayton@redhat.com> Acked-by: David Holder <david@erion.co.uk> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/dns_resolve.c')
-rw-r--r--fs/cifs/dns_resolve.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/dns_resolve.c b/fs/cifs/dns_resolve.c
index 91b5500755bf..87948147d7ec 100644
--- a/fs/cifs/dns_resolve.c
+++ b/fs/cifs/dns_resolve.c
@@ -35,7 +35,7 @@
35 * 0 - name is not IP 35 * 0 - name is not IP
36 */ 36 */
37static int 37static int
38is_ip(const char *name) 38is_ip(char *name)
39{ 39{
40 struct sockaddr_storage ss; 40 struct sockaddr_storage ss;
41 41
@@ -57,7 +57,7 @@ dns_resolver_instantiate(struct key *key, const void *data,
57 ip[datalen] = '\0'; 57 ip[datalen] = '\0';
58 58
59 /* make sure this looks like an address */ 59 /* make sure this looks like an address */
60 if (!is_ip((const char *) ip)) { 60 if (!is_ip(ip)) {
61 kfree(ip); 61 kfree(ip);
62 return -EINVAL; 62 return -EINVAL;
63 } 63 }