Address binding bug in innd

Illusion illusion+dated+1097096349.d8966b at ux1.eticomm.net
Thu Jul 8 20:59:08 UTC 2004


Hi,
A patch I recently sent in was incomplete.  It missed out the IPv6 case.
(I don't use v6)  Perhaps you noticed it but...

My original message to inn-bugs is appended below and a chap from
stanford.edu notified me earlier that it had been applied.
(Sorry, I deleted the msg, so don't have his details)

Bob

----- Forwarded message from tron at netbsd.org -----

From: tron at netbsd.org
Date: 7 Jul 2004 12:26:39 -0000
To: bsd at allegory.demon.co.uk, tron at netbsd.org, tron at netbsd.org
Subject: Re: pkg/26164

Synopsis: Address binding bug in innd

State-Changed-From-To: open->analyzed
State-Changed-By: tron
State-Changed-When: Wed Jul 7 12:25:36 UTC 2004
State-Changed-Why: 
The patch is basically correct but incomplete because it doesn't fix the
problem for the IPv6 case.

----- End forwarded message -----

----- Original message -----

To: gnats-bugs at gnats.NetBSD.org
Subject: 
From: bsd
Reply-To: bsd
X-send-pr-version: 3.95


>Submitter-Id:	net
>Originator:	Bob
>Organization:
>Confidential:	no
>Synopsis:	Address binding bug in innd
>Severity:	non-critical
>Priority:	medium
>Category:	pkg
>Class:		sw-bug
>Release:	NetBSD 2.0F
>Environment:
System: NetBSD tenebres.loc 2.0F NetBSD 2.0F (TENEBRES) #0: Tue Jun 29 15:24:47 BST 2004 rob at tenebres.loc:/usr/src/sys/arch/i386/compile/TENEBRES i386
Architecture: i386
Machine: i386
>Description:

    A bug in INN 2.4.1 prevents it from binding to a specified address.
    Normally one should be able to use the "bindaddress" option in /var/news/etc/inn.conf
    but its value is not used.  The code will report an error if the argument of "bindaddress"
    is not a dotted quad but will not use it because the C code does not set "addr_specified" to true.

    I'm submitting this bug report so you can include it in a pkgsrc patch, if appropriate.
    I will also send a copy to inn-bugs at isc.org

>How-To-Repeat:

    In /var/news/etc/inn.conf, set "bindaddress" to 127.0.0.1, ie include the line
	bindaddress:	127.0.0.1
    Restart innd and type "netstat -anf inet" which will show

	Active Internet connections (including servers)
	Proto Recv-Q Send-Q  Local Address          Foreign Address        State
	tcp        0      0  *.119                  *.*                    LISTEN

    whereas it should instead be

	Active Internet connections (including servers)
	Proto Recv-Q Send-Q  Local Address          Foreign Address        State
	tcp        0      0  127.0.0.1.119          *.*                    LISTEN

>Fix:

    Two possibilities:

	Quick Hack:
	    Add
		innflags:              "-I 127.0.0.1"
	    (or equiv) to inn.conf

	Correct solution:
	    Set "addr_specified" flag to make inndstart use the given address.

	    *** /usr/pkgsrc/news/inn/work/inn-2.4.1/innd/inndstart.c	Wed Jan  7 22:47:19 2004
	    --- /tmp/inndstart.c	Mon Jul  5 03:02:15 2004
	    ***************
	    *** 136,141 ****
	    --- 136,142 ----
		  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;




More information about the inn-bugs mailing list