Address binding bug in innd

Illusion illusion at eticomm.net
Wed Jul 7 10:21:57 UTC 2004


SEND-PR: -*- send-pr -*-
SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as
SEND-PR: will all comments (text enclosed in `<' and `>').
SEND-PR: 
SEND-PR: Please consult the send-pr man page `send-pr(1)' or the Texinfo
SEND-PR: manual if you are not sure how to fill out a problem report.
SEND-PR:
SEND-PR: NOTE: If you include a patch that corrects the problem, the
SEND-PR: issue will probably be handled much more quickly.
SEND-PR:
SEND-PR: Choose from the following categories:
SEND-PR:
SEND-PR: bin               install           kern              
SEND-PR: lib               misc              pkg               
SEND-PR: port-acorn26      port-acorn32      port-algor        
SEND-PR: port-alpha        port-amd64        port-amiga        
SEND-PR: port-amigappc     port-arc          port-arm          
SEND-PR: port-atari        port-bebox        port-cats         
SEND-PR: port-cesfic       port-cobalt       port-dreamcast    
SEND-PR: port-evbarm       port-evbmips      port-evbppc       
SEND-PR: port-evbsh3       port-evbsh5       port-hp300        
SEND-PR: port-hp700        port-hpcarm       port-hpcmips      
SEND-PR: port-hpcsh        port-hppa         port-i386         
SEND-PR: port-luna68k      port-m68k         port-mac68k       
SEND-PR: port-macppc       port-mips         port-mipsco       
SEND-PR: port-mmeye        port-mvme68k      port-mvmeppc      
SEND-PR: port-netwinder    port-news68k      port-newsmips     
SEND-PR: port-next68k      port-ofppc        port-pc532        
SEND-PR: port-playstation2 port-pmax         port-pmppc        
SEND-PR: port-powerpc      port-prep         port-sandpoint    
SEND-PR: port-sbmips       port-sgimips      port-sh3          
SEND-PR: port-sh5          port-shark        port-sparc        
SEND-PR: port-sparc64      port-sun2         port-sun3         
SEND-PR: port-vax          port-x68k         port-xen          
SEND-PR: security          standards         toolchain         
SEND-PR: xsrc              y2k               
SEND-PR:
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:
	<organization of PR author (multiple lines)>
>Confidential:	no
>Synopsis:	Address binding bug in innd
>Severity:	non-critical
>Priority:	medium
>Category:	pkg
>Class:		sw-bug
>Release:	NetBSD 2.0F
	<Please check that the above is correct for the bug being reported,>
	<and append source date of snapshot, if applicable (one line).>
>Environment:
	<The following information is extracted from your kernel. Please>
	<append output of "ldd", "ident" where relevant (multiple lines).>
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