]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: fix IPv6 link local, with scope id, address parsing
authorDaniel N Pettersson <danielnp@axis.com>
Thu, 27 Apr 2017 09:32:36 +0000 (11:32 +0200)
committerSteve French <smfrench@gmail.com>
Tue, 2 May 2017 19:57:34 +0000 (14:57 -0500)
commit66f02e28da7ccf15bd2afc02719afec6c02cd4d5
treecd9fe00cd6a145949bf642c9bfb470f44c9570e4
parenta0c97adca5277b792bbb80679dbde2c01038870e
cifs: fix IPv6 link local, with scope id, address parsing

When the IP address is gotten from the UNC, use only the address part
of the UNC. Else all after the percent sign in an IPv6 link local
address is interpreted as a scope id. This includes the slash and
share name. A scope id is expected to be an integer and any trailing
characters makes the conversion to integer fail.
Example of mount command that fails:
mount -i -t cifs //fe80::6a05:caff:fe3e:8ffc%2/test /mnt/t -o sec=none

Signed-off-by: Daniel N Pettersson <danielnp@axis.com>
Signed-off-by: Steve French <smfrench@gmail.com>
fs/cifs/connect.c