diff options
author | Jeff Layton <jlayton@redhat.com> | 2009-06-11 10:27:31 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2009-06-24 21:14:36 -0400 |
commit | 681bf72e4893a187cf6b6b62c08fc193f81c8c2f (patch) | |
tree | 5c580474a21edf38140407bd42f28853e9354e25 /fs/cifs/connect.c | |
parent | 268875b9d1dd1bf0b523c59e736da9bc20c8ce1f (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/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index c368ad658236..3fb799ff55c9 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -1386,8 +1386,10 @@ cifs_find_tcp_session(struct sockaddr_storage *addr) | |||
1386 | server->addr.sockAddr.sin_addr.s_addr)) | 1386 | server->addr.sockAddr.sin_addr.s_addr)) |
1387 | continue; | 1387 | continue; |
1388 | else if (addr->ss_family == AF_INET6 && | 1388 | else if (addr->ss_family == AF_INET6 && |
1389 | !ipv6_addr_equal(&server->addr.sockAddr6.sin6_addr, | 1389 | (!ipv6_addr_equal(&server->addr.sockAddr6.sin6_addr, |
1390 | &addr6->sin6_addr)) | 1390 | &addr6->sin6_addr) || |
1391 | server->addr.sockAddr6.sin6_scope_id != | ||
1392 | addr6->sin6_scope_id)) | ||
1391 | continue; | 1393 | continue; |
1392 | 1394 | ||
1393 | ++server->srv_count; | 1395 | ++server->srv_count; |