From fdb7caf293e860fda343f9cc98ff3342ed997b73 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sat, 18 Dec 1999 20:57:40 +1100 Subject: [PATCH] Avoid breakage on systems lacking IPv6 headers --- ChangeLog | 1 + canohost.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b89d475b9..b68e22ed7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 19991218 - Redhat init script patch from Chun-Chung Chen + - Avoid breakage on systems without IPv6 headers 19991216 - 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 @@ */ #include "includes.h" -RCSID("$Id: canohost.c,v 1.5 1999/12/13 23:47:15 damien Exp $"); +RCSID("$Id: canohost.c,v 1.6 1999/12/18 09:57:40 damien Exp $"); #include "packet.h" #include "xmalloc.h" @@ -160,8 +160,9 @@ peer_connection_is_on_socket() memset(&from, 0, sizeof(from)); if (getpeername(in, (struct sockaddr *) & from, &fromlen) < 0) return 0; - if (from.sin_family != AF_INET && from.sin_family != AF_INET6) + if (from.sin_family != AF_INET) return 0; + return 1; }