diff options
author | itojun <itojun@pkgsrc.org> | 2000-12-01 03:15:33 +0000 |
---|---|---|
committer | itojun <itojun@pkgsrc.org> | 2000-12-01 03:15:33 +0000 |
commit | acbd091b094d80588636852dcdcfa99a95d0f160 (patch) | |
tree | 8a8d3bdabbd5245f5b78a66b20c06f1719167386 /japanese | |
parent | ce2472e0f248286eaeab728555e5a57cf04c7f63 (diff) | |
download | pkgsrc-acbd091b094d80588636852dcdcfa99a95d0f160.tar.gz |
make call to getpeername IPv6-friendly.
correctly build IPv6-ready server.
Diffstat (limited to 'japanese')
-rw-r--r-- | japanese/canna-lib/files/patch-sum | 4 | ||||
-rw-r--r-- | japanese/canna-lib/patches/patch-ae | 43 | ||||
-rw-r--r-- | japanese/canna-server/Makefile | 4 |
3 files changed, 44 insertions, 7 deletions
diff --git a/japanese/canna-lib/files/patch-sum b/japanese/canna-lib/files/patch-sum index c9ed19f84ab..6f3cad54122 100644 --- a/japanese/canna-lib/files/patch-sum +++ b/japanese/canna-lib/files/patch-sum @@ -1,7 +1,7 @@ -$NetBSD: patch-sum,v 1.7 2000/11/30 16:00:07 itojun Exp $ +$NetBSD: patch-sum,v 1.8 2000/12/01 03:15:33 itojun Exp $ MD5 (patch-aa) = 657ef6604d96c24496e3d31de35aeff7 MD5 (patch-ab) = 9c308687cdc856ed489713dc2e929014 MD5 (patch-ac) = a1fd7fea8cc51e12336ab061a6e2a838 MD5 (patch-ad) = 9e09b258b32de008104a6654f6197f5d -MD5 (patch-ae) = 6d538475c41251665116c16aa7f22390 +MD5 (patch-ae) = 53201a9b6e43bc90b557c147d0f4cb32 diff --git a/japanese/canna-lib/patches/patch-ae b/japanese/canna-lib/patches/patch-ae index 645d063dc79..22b30f93e52 100644 --- a/japanese/canna-lib/patches/patch-ae +++ b/japanese/canna-lib/patches/patch-ae @@ -1,4 +1,4 @@ -$NetBSD: patch-ae,v 1.2 2000/11/30 16:00:07 itojun Exp $ +$NetBSD: patch-ae,v 1.3 2000/12/01 03:15:34 itojun Exp $ PATCH_SITES+= http://apps.v6.linux.or.jp/pub/Linux/IPv6-2/canna/ PATCHFILES+= Canna35b2-v6-20000602.diff.gz @@ -98,8 +98,8 @@ diff -ru server/Imakefile server/Imakefile IRSRCS = $(SRCS) $(HEADER) diff -ru server/connection.c server/connection.c ---- server/connection.c.orig Wed Nov 27 16:26:10 1996 -+++ server/connection.c Fri Dec 1 00:55:14 2000 +--- server/connection.c Wed Nov 27 16:26:10 1996 ++++ server/connection.c Fri Dec 1 11:52:10 2000 @@ -133,2 +133,63 @@ #ifdef USE_INET_SOCKET /* INETドメインの作成 */ +#ifdef INET6 @@ -195,3 +195,40 @@ diff -ru server/connection.c server/connection.c return 0; /* 作成に失敗 */ +#endif } +@@ -609,6 +691,11 @@ + { ++#ifdef INET6 ++ struct sockaddr_storage from; ++#else + struct sockaddr_in from; + struct hostent *hp; +- char buf[MAXDATA], *inet_ntoa(); +- int fromlen = sizeof( struct sockaddr_in ) ; ++ char *inet_ntoa(); ++#endif ++ char buf[MAXDATA]; ++ int fromlen = sizeof(from); + +@@ -622,2 +709,15 @@ + ++#ifdef INET6 ++#ifdef AF_UNIX ++ if (from.ss_family != AF_UNIX) ++#else ++ if (from.ss_family != AF_LOCAL) ++#endif ++ { ++ if (getnameinfo((struct sockaddr *)&from, fromlen, buf, sizeof(buf), ++ NULL, 0, 0) != 0) { ++ strcpy(buf, "invalid"); ++ } ++ } ++#else + if( from.sin_family == AF_INET ) { +@@ -630,3 +730,5 @@ + strncpy( buf, inet_ntoa( from.sin_addr ), MAXDATA-1 ) ; +- } else { ++ } ++#endif ++ else { + client->hostaddr = IR_UNIX_ADDRESS; diff --git a/japanese/canna-server/Makefile b/japanese/canna-server/Makefile index ccde7aeb80c..459ac098d84 100644 --- a/japanese/canna-server/Makefile +++ b/japanese/canna-server/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2000/11/30 15:48:10 itojun Exp $ +# $NetBSD: Makefile,v 1.6 2000/12/01 03:15:34 itojun Exp $ DISTNAME= Canna35b2 PKGNAME= Canna-server-3.5b2 @@ -33,7 +33,7 @@ CANNA_SPOOL= /var/spool/canna CANNA_MODE= 0755 DICT_DIR?= /var/dict MAKE_ENV+= CANNAOWNER=${CANNAOWNER} CANNAGROUP=${CANNAGROUP} \ - CANNA_SPOOL=${CANNA_SPOOL} DICT_DIR=${DICT_DIR} + CANNA_SPOOL=${CANNA_SPOOL} DICT_DIR=${DICT_DIR} INET6=${INET6} PLIST_SUBST= CANNAOWNER=${CANNAOWNER} CANNAGROUP=${CANNAGROUP} \ CANNA_SPOOL=${CANNA_SPOOL} CANNA_MODE=${CANNA_MODE} \ DICT_DIR=${DICT_DIR} PREFIX=${PREFIX} |