chiark
/
gitweb
/
~ianmdlvl
/
adns.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf744ca
)
tolerate libc giving NONAME when we have more subtle answer
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 28 May 2014 22:10:51 +0000
(23:10 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 28 May 2014 22:10:51 +0000
(23:10 +0100)
client/addrtext.c
patch
|
blob
|
history
diff --git
a/client/addrtext.c
b/client/addrtext.c
index 950d901ead200183ac8821caca003b69dc03959e..136de26ddf6d23babf83daba098500e891890000 100644
(file)
--- a/
client/addrtext.c
+++ b/
client/addrtext.c
@@
-124,9
+124,19
@@
static void dotest(const char *input) {
air->ai_family, (long)air->ai_addrlen, air->ai_addr, air->ai_next);
printf(":");
- if (our_r==EINVAL && libc_r==EAI_NONAME && !air) {
- printf(" invalid");
- goto ok;
+ if (libc_r==EAI_NONAME && !air) {
+ if (strchr(input,'%') && (our_r==ENOSYS || our_r==ENXIO)) {
+ printf(" bad-scope");
+ goto ok;
+ }
+ if (strchr(input,'%') && our_r==ENOSYS) {
+ printf(" bad-scope");
+ goto ok;
+ }
+ if (our_r==EINVAL) {
+ printf(" invalid");
+ goto ok;
+ }
}
printf(" valid");