~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add some hard-coded textual literal-IP representations of localhost to
[sgt/putty]
/
unix
/
uxnet.c
diff --git
a/unix/uxnet.c
b/unix/uxnet.c
index
c0f2471
..
96d3aa5
100644
(file)
--- a/
unix/uxnet.c
+++ b/
unix/uxnet.c
@@
-326,7
+326,9
@@
void sk_getaddr(SockAddr addr, char *buf, int buflen)
int sk_hostname_is_local(char *name)
{
- return !strcmp(name, "localhost");
+ return !strcmp(name, "localhost") ||
+ !strcmp(name, "::1") ||
+ !strncmp(name, "127.", 4);
}
#define ipv4_is_loopback(addr) \