From: Jeff Layton Date: Thu, 11 Jun 2009 14:27:31 +0000 (-0400) Subject: cifs: have cifs parse scope_id out of IPv6 addresses and use it X-Git-Tag: v2.6.31-rc2~83^2~7 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=681bf72e4893a187cf6b6b62c08fc193f81c8c2f;p=pandora-kernel.git 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 Acked-by: David Holder Signed-off-by: Steve French --- 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) server->addr.sockAddr.sin_addr.s_addr)) continue; else if (addr->ss_family == AF_INET6 && - !ipv6_addr_equal(&server->addr.sockAddr6.sin6_addr, - &addr6->sin6_addr)) + (!ipv6_addr_equal(&server->addr.sockAddr6.sin6_addr, + &addr6->sin6_addr) || + server->addr.sockAddr6.sin6_scope_id != + addr6->sin6_scope_id)) continue; ++server->srv_count; Reading git-diff-tree failed