Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2000:
[Freeciv-Dev] Re: Hostname lookups again.
Home

[Freeciv-Dev] Re: Hostname lookups again.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gaute B Strokkenes <gs234@xxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Hostname lookups again.
From: Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx>
Date: Wed, 20 Sep 2000 02:20:58 +0100 (WET DST)

On 20 Sep 2000, Gaute B Strokkenes wrote:

> Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx> writes:
> 
> > On 19 Sep 2000, Gaute B Strokkenes wrote:
> > > Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx> writes:
> > > > On 18 Sep 2000, Gaute B Strokkenes wrote:

> Not quite.  gethostbyname() and friends were intended from the
> beginning as an extensible system, and unless you're prepared to
> guarantee that no one has every used it for anything other than IPv4
> and that no one ever will (and unless you have a functional crystal
> ball, you can't) checking for AF_INET is the smart thing to do.  It's
> not like it's either difficult or costly.

Such a marvelous extensible function that it isn't MT Safe and you can't
tell it which address family you want to lookup for the address.  I'm
pretty certain all future programs which support IPv6 will use it eh?

> So the experts are not agreed, or there are conflicting standards
> and/or implementations out there.  And you can bet that whatever
> reference is correct, if there is misleading documentation out there,
> there will be similarly demented implementations.  Accept, check, and
> deflect.  Simple.

I dunno if you checked that W. Stevens (R.I.P.) was in the name list in
the top of the document.  If that name doesn't tell you anything, go find
out who he was and you'll see how much weight he had in the community.
And this is RFC 2553 even if it's "informational".  You know what an RFC
is right?

> And there are no (possibly broken) systems where it doesn't?  And
> you're 100% confident that there never will be?  And, for that matter,
> if you're that sure that it's AF_INET anyway, why reference the length
> field, when you know it's sizeof (struct in_addr) anyway?

Want to know the truth?  Because i wanted to.  Yeah i liked the look of it
better than a sizeof() so it was pure aesthetics.

I don't care for non proved problem cases on such petty things as this.
We have enough proved problem cases to fix first.  If we added extraneous
checks everywhere like would be required in your view we would have
nothing else to do but that.

If you believe in science (like i do) you don't believe in *anything* 100%
sure.  I just want to see it to believe it.  Prove me: show me a real
case.

> Superfluous checks are good.  That's why assert() exists, and why
> people use it.  The only time that you don't want superfluous checks
> is when there is some sort of excessive penalty involved.  That's not
> the case here.

Sure, but if all people checked for every screwball error that could
exist you would have more error checking code than real program code.
Especially something as remote as this and which wouldn't cause any major
problem if it did exist (and you haven't proven me that).

> <bastard-mode>I thought you just said that we shouldn't support broken
> systems?</bastard-mode>But then again, if someone can't connect to a
> DNS server they're probably either not connected or too busy fixing
> their broken setup to play Freeciv.

I didn't say that.  If you had bothered to read what i said you would have
noticed that i said we shouldn't check for security flaws on libc, that's
libc's problem.  I never heard of any vulnerability on that anyway.


If it ain't broken, don't fix it.


As far as me not taking notice of your complaints...  I don't care about
them until i hear someone complain with a real problem, i never heard
real complaints about this and i've been around for a bit.  I won't accept
this part of your patch without a real case - end of story.  However i'm
not the only maintainer (not even head) and i do not have the final say on
the matter, so do whatever you want.  Just don't ask me to fix any code
you might break, i have enough problems with what i break :-)

---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa






[Prev in Thread] Current Thread [Next in Thread]