INN commit: trunk/innfeed (host.c)
INN Commit
Russ_Allbery at isc.org
Wed Nov 19 11:41:38 UTC 2008
Date: Wednesday, November 19, 2008 @ 03:41:37
Author: iulius
Revision: 8176
Show all addresses that innfeed thinks the peer has.
Patch from D. Stussy.
Modified:
trunk/innfeed/host.c
--------+
host.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
Modified: host.c
===================================================================
--- host.c 2008-11-18 19:15:53 UTC (rev 8175)
+++ host.c 2008-11-19 11:41:37 UTC (rev 8176)
@@ -3312,6 +3312,7 @@
* format of the output is:
*
* sitename
+ * Addr 1: IPv4 12.0.0.42
* seconds: 351 art. timeout: 400 ip name: foo.bar
* offered: 1194 resp. timeout: 240 port: 119
* accepted: 178 want streaming: yes active cxns: 6
@@ -3358,6 +3359,32 @@
fputc ('\n',fp) ;
+ if (host->ipAddrs) {
+ int i;
+ char ip_addr[INET6_ADDRSTRLEN];
+ char *family;
+
+ for(i = 0; host->ipAddrs[i] != NULL; i++) {
+ switch(host->ipAddrs[i]->sa_family) {
+ case AF_INET:
+ family = xstrdup("IPv4");
+ break;
+#ifdef HAVE_INET6
+ case AF_INET6:
+ family = xstrdup("IPv6");
+ break;
+#endif
+ default:
+ family = xstrdup("????");
+ break;
+ }
+
+ network_sockaddr_sprint(ip_addr, sizeof(ip_addr),
+ host->ipAddrs[i]);
+ fprintf(fp, " Addr %-2u: %-4.4s %s\n", i+1, family, ip_addr);
+ }
+ }
+
fprintf (fp, " seconds: %-7ld art. timeout: %-5d ip name: %s\n",
host->firstConnectTime > 0 ? (long)(now - host->firstConnectTime) : 0,
host->params->articleTimeout, host->params->ipName) ;
More information about the inn-committers
mailing list