chiark / gitweb /
stest/udp-preload: Be more relaxed about paths
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 5 Dec 2019 02:21:56 +0000 (02:21 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 7 Dec 2019 15:49:34 +0000 (15:49 +0000)
commit2a01345b9034b947bb179bce29a13028ea9ca64d
tree74bfaad583ab4f98257403a8e069e864688cefa4
parenta3e4fa1e50f925d776a8511902ad848874bb1fc5
stest/udp-preload: Be more relaxed about paths

We would give ENAMETOOLONG if the specified path plus a maximal IPv6
address string wouldn't fit.  But in practice we don't use IPv6
addresses which stringify to anything that long, and this imposes an
annoyingly short restriction on the length of the emulation socket
directory path (a restriction which is going to be not met in my own
working tree when I add more sophisticated tests).

Instead, pass the suffix string to sun_prep and do the length check on
the actual length.  This means that addresses with short strings can
work, even if in principle addresses with long strings might fail.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
stest/udp-preload.c