From owner-freebsd-current Sun Aug 13 15: 6:42 2000 Delivered-To: freebsd-current@freebsd.org Received: from peace.mahoroba.org (peace.calm.imasy.or.jp [202.227.26.34]) by hub.freebsd.org (Postfix) with ESMTP id CB48C37B68C; Sun, 13 Aug 2000 15:06:33 -0700 (PDT) (envelope-from ume@mahoroba.org) Received: from localhost (IDENT:ErRe+bjvZ4RzVXgm/J+6oPjT3Evd5UcmkDZ6iXO2ZSbE80RY+QhY/inzN0nZk/KM@localhost [::1]) (authenticated) by peace.mahoroba.org (8.11.0/8.11.0/peace) with ESMTP/inet6 id e7DM5Mb21586; Mon, 14 Aug 2000 07:05:23 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Mon, 14 Aug 2000 07:05:17 +0900 (JST) Message-Id: <20000814.070517.08313193.ume@mahoroba.org> To: jhay@icomtek.co.za Cc: gshapiro@gshapiro.net, gshapiro@FreeBSD.ORG, freebsd-current@FreeBSD.ORG Subject: Re: sendmail updated from 8.9.3 to 8.11.0 in -current From: Hajimu UMEMOTO In-Reply-To: <20000814.054434.115900410.ume@mahoroba.org> References: <14742.61852.184466.543141@horsey.gshapiro.net> <200008131928.e7DJSKg20282@zibbi.mikom.csir.co.za> <20000814.054434.115900410.ume@mahoroba.org> X-Mailer: xcite1.20> Mew version 1.95b38 on Emacs 20.6 / Mule 4.0 =?iso-2022-jp?B?KBskQjJWMWMbKEIp?= X-PGP-Public-Key: http://www.imasy.org/~ume/publickey.asc X-PGP-Fingerprint: 6B 0C 53 FC 5D D0 37 91 05 D0 B3 EF 36 9B 6A BC X-URL: http://www.imasy.org/~ume/ X-OS: FreeBSD 5.0-CURRENT Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG ume> Please try this patch. ume> Index: sendmail-8.11.0/sendmail/conf.c ume> diff -u sendmail-8.11.0/sendmail/conf.c.orig sendmail-8.11.0/sendmail/conf.c Oops, previous patch is insufficient. I forgot to open INET6 socket. Index: sendmail-8.11.0/sendmail/conf.c diff -u sendmail-8.11.0/sendmail/conf.c.orig sendmail-8.11.0/sendmail/conf.c --- sendmail-8.11.0/sendmail/conf.c.orig Sun Jul 16 02:35:18 2000 +++ sendmail-8.11.0/sendmail/conf.c Mon Aug 14 06:52:16 2000 @@ -4771,6 +4771,11 @@ # undef __P # endif /* (_AIX4 >= 40300) && !defined(_NET_IF_H) */ # include +#if NETINET6 && !defined(SIOCGLIFCONF) +# include +# include +# include +#endif /* NETINET6 && !SIOCGLIFCONF */ #endif /* defined(SIOCGIFCONF) && !SIOCGIFCONF_IS_BROKEN */ void @@ -4958,6 +4963,9 @@ #else /* NETINET6 && defined(SIOCGLIFCONF) */ # if defined(SIOCGIFCONF) && !SIOCGIFCONF_IS_BROKEN int s; +#if NETINET6 && defined(SIOCGIFAFLAG_IN6) + int s6; +#endif /* NETINET6 && SIOCGIFAFLAG_IN6 */ int i; struct ifconf ifc; int numifs; @@ -4996,6 +5004,10 @@ return; } +#if NETINET6 && defined(SIOCGIFAFLAG_IN6) + s6 = socket(AF_INET6, SOCK_DGRAM, 0); +#endif /* NETINET6 && SIOCGIFAFLAG_IN6 */ + /* scan the list of IP address */ if (tTd(0, 40)) dprintf("scanning for interface specific names, ifc_len=%d\n", @@ -5009,6 +5021,9 @@ # if NETINET6 char *addr; struct in6_addr ia6; +# ifdef SIOCGIFAFLAG_IN6 + struct in6_ifreq ifr6; +# endif /* SIOCGIFAFLAG_IN6 */ # endif /* NETINET6 */ struct in_addr ia; # ifdef SIOCGIFFLAGS @@ -5094,6 +5109,22 @@ continue; } +# ifdef SIOCGIFAFLAG_IN6 + memset(&ifr6, '\0', sizeof(struct in6_ifreq)); + strncpy(ifr6.ifr_name, ifr->ifr_name, + sizeof(ifr->ifr_name)); + ifr6.ifr_addr = sa->sin6; + if (s6 < 0 || ioctl(s6, SIOCGIFAFLAG_IN6, &ifr6) < 0) + { + if (tTd(0, 4)) + dprintf("SIOCGIFAFLAG_IN6 failed: %s\n", + errstring(errno)); + continue; + } + if (ifr6.ifr_ifru.ifru_flags6 & IN6_IFF_ANYCAST) + continue; +# endif /* SIOCGIFAFLAG_IN6 */ + /* save IP address in text from */ addr = anynet_ntop(&ia6, buf6, sizeof buf6); if (addr != NULL) @@ -5123,6 +5154,10 @@ } free(ifc.ifc_buf); (void) close(s); +# if NETINET6 && defined(SIOCGIFAFLAG_IN6) + if (s6 >= 0) + (void) close(s6); +# endif /* NETINET6 && SIOCGIFAFLAG_IN6 */ # undef IFRFREF # endif /* defined(SIOCGIFCONF) && !SIOCGIFCONF_IS_BROKEN */ #endif /* NETINET6 && defined(SIOCGLIFCONF) */ -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@bisd.hitachi.co.jp ume@FreeBSD.org http://www.imasy.org/~ume/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message