]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
afs: Fix address list parsing
authorDavid Howells <dhowells@redhat.com>
Wed, 9 May 2018 21:03:18 +0000 (22:03 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 1 Oct 2018 12:58:14 +0000 (14:58 +0200)
commit9de0b1ed5e5231119ad155945e4f66e2dd92e25a
tree3ea56028793ece003135a5b12ff1b2f631530d63
parent5c9c0830b548fb0d35a73081cb1c32c51da6e87a
afs: Fix address list parsing

BugLink: http://bugs.launchpad.net/bugs/1794889
[ Upstream commit 01fd79e6de74a447c5657913a335d9ce6508cdb1 ]

The parsing of port specifiers in the address list obtained from the DNS
resolution upcall doesn't work as in4_pton() and in6_pton() will fail on
encountering an unexpected delimiter (in this case, the '+' marking the
port number).  However, in*_pton() can't be given multiple specifiers.

Fix this by finding the delimiter in advance and not relying on in*_pton()
to find the end of the address for us.

Fixes: 8b2a464ced77 ("afs: Add an address list concept")
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/afs/addr_list.c