diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-07-20 18:30:47 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-07-20 18:30:47 +0000 |
commit | 8e50aa73418d85d5861a8849859d8cb6923b1f69 (patch) | |
tree | d0648082fa7e74e792f7011bf1a12e699e40d017 /src/common/compat.c | |
parent | 9bfe9cfb40621be49812fa221b726cd7b1356d5e (diff) | |
download | tor-8e50aa73418d85d5861a8849859d8cb6923b1f69.tar.gz tor-8e50aa73418d85d5861a8849859d8cb6923b1f69.zip |
r13856@catbus: nickm | 2007-07-20 14:30:44 -0400
slightly smarter heuristic about when to use obsolete ::a.b.c.d format.
svn:r10893
Diffstat (limited to 'src/common/compat.c')
-rw-r--r-- | src/common/compat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/compat.c b/src/common/compat.c index ef95ba0c13..0aa7909c0a 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -834,7 +834,7 @@ tor_inet_ntop(int af, const void *src, char *dst, size_t len) words[i] = (((uint16_t)addr->s6_addr[2*i])<<8) + addr->s6_addr[2*i+1]; } if (words[0] == 0 && words[1] == 0 && words[2] == 0 && words[3] == 0 && - words[4] == 0 && ((words[5] == 0 && (words[6] || words[7])) || + words[4] == 0 && ((words[5] == 0 && words[6] && words[7]) || (words[5] == 0xffff))) { /* This is an IPv4 address. */ if (words[5] == 0) { |