]> git.baikalelectronics.ru Git - kernel.git/commit
afs: Fix address list parsing
authorDavid Howells <dhowells@redhat.com>
Wed, 9 May 2018 21:03:18 +0000 (22:03 +0100)
committerDavid Howells <dhowells@redhat.com>
Mon, 14 May 2018 12:17:35 +0000 (13:17 +0100)
commit78218d942bc1a1f0132b3fa42860afe703a41a1d
tree167b975bab2db0a28e9f620c1d74e4980d34cf70
parent91c4195a12e2ebe57ffb59ba31e1f7b7611614ab
afs: Fix address list parsing

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: f78b8f5e4899 ("afs: Add an address list concept")
Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/addr_list.c