[patch] Re: inetd parsing broke for non IPv6 configurations

2002-07-18 Thread Steve Ames


The following patch fixes this problem for me. When a tcp6 was
encountered then v6bind is set to 1 and was not being cleared
after the check to ignore IPv6. This patch may not be entirely
correct, but its simple and does fix the problem I reported
earlier. The v4bind check that should have resulted in clearing
v6bind back to 0 seems a bit questionable. I believe the flag
should be cleared always.

-Steve

-
--- inetd.c.old Mon Jul 15 14:09:33 2002
+++ inetd.c Thu Jul 18 11:53:55 2002
@@ -1726,12 +1726,9 @@
if (v6bind != 0 && no_v6bind != 0) {
syslog(LOG_INFO, "IPv6 bind is ignored for %s",
   sep->se_service);
-   if (v4bind && no_v4bind == 0)
-   v6bind = 0;
-   else {
-   freeconfig(sep);
-   goto more;
-   }
+   v6bind = 0;
+   freeconfig(sep);
+   goto more;
}
if (v6bind != 0) {
sep->se_family = AF_INET6;
-

-Steve

On Wed, Jul 17, 2002 at 02:36:46PM -0500, Steve Ames wrote:
> 
> This worked 3 days ago but I just upgraded to -CURRENT from today
> and its not quite working now. If you have tcp6 lines in your
> inetd.conf but do not have IPv6 enabled in the kernel your inetd
> will stop adding services after it encounters the first line with
> a tcp6 in it:
> 
> mysystem# inetd -d
> ADD : ftp proto=tcp accept=1 max=0 user=root group=(null)class=daemon builtin=0x
> 0 server=/usr/libexec/ftpd policy=""
> inetd: ftp/tcp: ipsec initialization failed; in entrust
> inetd: ftp/tcp: ipsec initialization failed; tut entrust
> inetd: enabling ftp, fd 4
> inetd: registered /usr/libexec/ftpd on 4
> inetd[52984]: IPv6 bind is ignored for ftp
> inetd[52984]: IPv6 bind is ignored for telnet
> inetd[52984]: IPv6 bind is ignored for telnet
> inetd[52984]: IPv6 bind is ignored for comsat
> inetd[52984]: IPv6 bind is ignored for ntalk
> inetd[52984]: IPv6 bind is ignored for pop3
> inetd[52984]: IPv6 bind is ignored for imap4
> inetd[52984]: IPv6 bind is ignored for imaps
> inetd[52984]: IPv6 bind is ignored for auth
> inetd[52984]: IPv6 bind is ignored for auth
> inetd[52984]: IPv6 bind is ignored for gpsclock
> 
> Here it correctly adds ftp/tcp and ignores ftp/tcp6... but then it
> appears to see all remaining entries as tcp6 and ignores them even
> when they are most certainly listed as tcp and not tcp6.
> 
> I'm guessing that 
> 
> $FreeBSD: src/usr.sbin/inetd/inetd.c,v 1.105 2002/07/15 19:09:33
> 
> is the culprit. This commit was to add support for rpc IPv6 and
> does appear to change the code block where the "IPv6 bind is
> ignored" appears..
> 
> -Steve
> 
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-current" in the body of the message

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



inetd parsing broke for non IPv6 configurations

2002-07-17 Thread Steve Ames


This worked 3 days ago but I just upgraded to -CURRENT from today
and its not quite working now. If you have tcp6 lines in your
inetd.conf but do not have IPv6 enabled in the kernel your inetd
will stop adding services after it encounters the first line with
a tcp6 in it:

mysystem# inetd -d
ADD : ftp proto=tcp accept=1 max=0 user=root group=(null)class=daemon builtin=0x
0 server=/usr/libexec/ftpd policy=""
inetd: ftp/tcp: ipsec initialization failed; in entrust
inetd: ftp/tcp: ipsec initialization failed; tut entrust
inetd: enabling ftp, fd 4
inetd: registered /usr/libexec/ftpd on 4
inetd[52984]: IPv6 bind is ignored for ftp
inetd[52984]: IPv6 bind is ignored for telnet
inetd[52984]: IPv6 bind is ignored for telnet
inetd[52984]: IPv6 bind is ignored for comsat
inetd[52984]: IPv6 bind is ignored for ntalk
inetd[52984]: IPv6 bind is ignored for pop3
inetd[52984]: IPv6 bind is ignored for imap4
inetd[52984]: IPv6 bind is ignored for imaps
inetd[52984]: IPv6 bind is ignored for auth
inetd[52984]: IPv6 bind is ignored for auth
inetd[52984]: IPv6 bind is ignored for gpsclock

Here it correctly adds ftp/tcp and ignores ftp/tcp6... but then it
appears to see all remaining entries as tcp6 and ignores them even
when they are most certainly listed as tcp and not tcp6.

I'm guessing that 

$FreeBSD: src/usr.sbin/inetd/inetd.c,v 1.105 2002/07/15 19:09:33

is the culprit. This commit was to add support for rpc IPv6 and
does appear to change the code block where the "IPv6 bind is
ignored" appears..

-Steve


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message