Date: Fri, 12 Mar 2004 09:06:30 -0800 From: Brooks Davis <brooks@one-eyed-alien.net> To: David Malone <dwmalone@maths.tcd.ie> Cc: dwmalone@freebsd.org Subject: Re: inetd needs "discard" service in /etc/services Message-ID: <20040312170629.GB7661@Odin.AC.HMC.Edu> In-Reply-To: <200403121051.aa75277@salmon.maths.tcd.ie> References: <20040312010000.GA9949@Odin.AC.HMC.Edu> <200403121051.aa75277@salmon.maths.tcd.ie>
next in thread | previous in thread | raw e-mail | index | archive | help
--mxv5cy4qt+RJ9ypb
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Fri, Mar 12, 2004 at 10:51:13AM +0000, David Malone wrote:
> > I would like to commit the following patch. It changes the port from
> > discard to syslog and documents the dependency. I choose syslog because
> > it really does need to be in /etc/services on most machines since it
> > starts before NIS. I'll also file a PR against inetd in hopes that
> > someone gets board enough to fix it some day.
>=20
> getaddrinfo can also accept numeric service names (ie. port numbers
> in the case of UDP/TCP). I wonder if it would be better to just
> replace the service name with "1" or some such? I guess that would
> also fix your problem.
Nope, I tried that. It turns out there's an annoying edge case that
makes it not work in this case (from line 496):
* check for special cases. (1) numeric servname is disallowed if
* socktype/protocol are left unspecified. (2) servname is disallow=
ed
* for raw and other inet{,6} sockets.=20
The real problem is that we should either not use getaddrinfo to make
sockaddrs or we should do it on demand when we actually have what we
need (i.e. a service name and protocol).
-- Brooks
--=20
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4
--mxv5cy4qt+RJ9ypb
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQFAUe4SXY6L6fI4GtQRAuzpAJ0WAQYVdH9uQPeqiFBF/Htt1HTL3QCg0dkM
FK2Kx66UWM2yLTQiUmUPKEI=
=Ls5z
-----END PGP SIGNATURE-----
--mxv5cy4qt+RJ9ypb--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040312170629.GB7661>
