Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jul 2002 06:00:19 -0700 (PDT)
From:      Yar Tikhiy <yar@freebsd.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/36955: Stock ftpd does not reuse ports in passive mode and fails
Message-ID:  <200207211300.g6LD0J6F056767@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/36955; it has been noted by GNATS.

From: Yar Tikhiy <yar@freebsd.org>
To: Maxim Konovalov <maxim@macomnet.ru>
Cc: bug-followup@freebsd.org,
	Eugene Grosbein <eugen@svzserv.kemerovo.su>
Subject: Re: bin/36955: Stock ftpd does not reuse ports in passive mode and fails
Date: Sun, 21 Jul 2002 16:59:45 +0400

 Setting SO_REUSEADDR on a listening socket is always a good idea.
 Plese refer to the following URL for a detailed explanation:
 http://www.kohala.com/start/torek.94dec31.txt
 
 BTW, I'd omit casting the "&on" parameter to setsockopt(2) to "char
 *" since now setsockopt(2) expects "void *" there.  In general, all
 that pointer casting in our ftpd is a real mess.  As a matter of
 fact, a pointer (or 0 as the null pointer) needs to be casted to a
 certain type only when passing it to a function without a prototype.
 And casting such a pointer to a wrong type is a really bad thing
 to do.
 
 -- 
 Yar

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207211300.g6LD0J6F056767>