diff options
author | Damien Miller <djm@mindrot.org> | 1999-12-18 20:57:40 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 1999-12-18 20:57:40 +1100 |
commit | fdb7caf293e860fda343f9cc98ff3342ed997b73 (patch) | |
tree | 81cdfa33653f0ff28f85b0a0b8a00235990206de | |
parent | c4c647fb9465ae98816c5a6a1a6d9dae0e383e9a (diff) |
Avoid breakage on systems lacking IPv6 headers
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | canohost.c | 5 |
2 files changed, 4 insertions, 2 deletions
@@ -1,6 +1,7 @@ | |||
1 | 19991218 | 1 | 19991218 |
2 | - Redhat init script patch from Chun-Chung Chen | 2 | - Redhat init script patch from Chun-Chung Chen |
3 | <cjj@u.washington.edu> | 3 | <cjj@u.washington.edu> |
4 | - Avoid breakage on systems without IPv6 headers | ||
4 | 5 | ||
5 | 19991216 | 6 | 19991216 |
6 | - Makefile changes for Solaris from Peter Kocks | 7 | - Makefile changes for Solaris from Peter Kocks |
diff --git a/canohost.c b/canohost.c index e61628b77..edfaa94e1 100644 --- a/canohost.c +++ b/canohost.c | |||
@@ -14,7 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include "includes.h" | 16 | #include "includes.h" |
17 | RCSID("$Id: canohost.c,v 1.5 1999/12/13 23:47:15 damien Exp $"); | 17 | RCSID("$Id: canohost.c,v 1.6 1999/12/18 09:57:40 damien Exp $"); |
18 | 18 | ||
19 | #include "packet.h" | 19 | #include "packet.h" |
20 | #include "xmalloc.h" | 20 | #include "xmalloc.h" |
@@ -160,8 +160,9 @@ peer_connection_is_on_socket() | |||
160 | memset(&from, 0, sizeof(from)); | 160 | memset(&from, 0, sizeof(from)); |
161 | if (getpeername(in, (struct sockaddr *) & from, &fromlen) < 0) | 161 | if (getpeername(in, (struct sockaddr *) & from, &fromlen) < 0) |
162 | return 0; | 162 | return 0; |
163 | if (from.sin_family != AF_INET && from.sin_family != AF_INET6) | 163 | if (from.sin_family != AF_INET) |
164 | return 0; | 164 | return 0; |
165 | |||
165 | return 1; | 166 | return 1; |
166 | } | 167 | } |
167 | 168 | ||