Fixing bindaddress in INN 2.4 with IPv6
Russ Allbery
eagle at windlord.stanford.edu
Sun Jan 11 23:22:28 UTC 2004
This is the original Debian bug report:
| I want to make inn only available to my network, so I set bindaddress in
| inn.conf to 192.168.1.1 (I've also tried it with double quotes). But
| when I start inn it still bind itself to all interfaces.
| Starting inn gives only one error message in news.crit:
| Mar 7 13:59:30 vorlon innd: SERVER cant listen RCreader Address already in use
I think I've tracked this down. inndstart in INN 2.4 does look at the
bindaddress settings, but it doesn't set the flag that says a specific
bindaddress has been specified, and therefore just goes on to walk through
all the interfaces with getaddrinfo.
I believe this patch should fix it, and it's obviously correct. I'm
applying it to STABLE CVS.
--- innd/inndstart.c 2003/01/19 19:58:21 1.55
+++ innd/inndstart.c 2004/01/11 23:21:04
@@ -136,6 +136,7 @@ main(int argc, char *argv[])
if (p && strcmp(p, "all") != 0 && strcmp(p, "any") != 0) {
if (!inet_aton(p, &address))
die("invalid bindaddress in inn.conf (%s)", p);
+ addr_specified = true;
}
#ifdef HAVE_INET6
address6 = in6addr_any;
@@ -143,6 +144,7 @@ main(int argc, char *argv[])
if (p && strcmp(p, "all") != 0 && strcmp(p, "any") != 0) {
if (inet_pton(AF_INET6, p, &address6) < 1)
die("invalid bindaddress6 in inn.conf (%s)", p);
+ addr6_specified = true;
}
#endif
If anyone has a chance to try this, please let me know if it works.
--
Russ Allbery <eagle at windlord.stanford.edu>
Technical Lead, ITSS Infrastructure Operations, Stanford University
More information about the inn-workers
mailing list