mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
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>
This commit is contained in:
parent
268875b9d1
commit
681bf72e48
3 changed files with 33 additions and 9 deletions
|
@ -35,7 +35,7 @@
|
|||
* 0 - name is not IP
|
||||
*/
|
||||
static int
|
||||
is_ip(const char *name)
|
||||
is_ip(char *name)
|
||||
{
|
||||
struct sockaddr_storage ss;
|
||||
|
||||
|
@ -57,7 +57,7 @@ dns_resolver_instantiate(struct key *key, const void *data,
|
|||
ip[datalen] = '\0';
|
||||
|
||||
/* make sure this looks like an address */
|
||||
if (!is_ip((const char *) ip)) {
|
||||
if (!is_ip(ip)) {
|
||||
kfree(ip);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue