🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
4 messages
4 total messages Started by D. Stussy Sun, 28 Sep 2008 21:56
Might this be a (future) bug that needs correction? (INN 2.4.5)
#79488
Author: D. Stussy
Date: Sun, 28 Sep 2008 21:56
10 lines
1342 bytes
Source file:  innd/art.c  (2 locations in file)
Feature:  logipaddr.
Possible bug status:  Cosmetic.  Does not impair functionality.

Issue:  Comparison against a text literal "0.0.0.0"

What if the news server host is IPv6 only?  Shouldn't there also be a
comparison against "::"?

Re: Might this be a (future) bug that needs correction? (INN 2.4.5)
#79489
Author: Russ Allbery
Date: Sun, 28 Sep 2008 22:07
24 lines
1885 bytes
"D. Stussy" <spam@bde-arc.ampr.org> writes:

> Source file:  innd/art.c  (2 locations in file)
> Feature:  logipaddr.
> Possible bug status:  Cosmetic.  Does not impair functionality.
>
> Issue:  Comparison against a text literal "0.0.0.0"
>
> What if the news server host is IPv6 only?  Shouldn't there also be a
> comparison against "::"?

The address in this case is entirely artificial.  It's checking whether
this channel is the local channel, whose address is set to 0.0.0.0 when
the local channel is created, so that it does the right thing with UUCP
feeds.

It's weird code.  There should probably be some other way of checking
for the local channel.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: Might this be a (future) bug that needs correction? (INN 2.4.5)
#79494
Author: D. Stussy
Date: Mon, 29 Sep 2008 10:30
27 lines
2308 bytes
"Russ Allbery" <rra@stanford.edu> wrote in message
news:871vz3gc1l.fsf@windlord.stanford.edu...
> "D. Stussy" <spam@bde-arc.ampr.org> writes:
> > Source file:  innd/art.c  (2 locations in file)
> > Feature:  logipaddr.
> > Possible bug status:  Cosmetic.  Does not impair functionality.
> >
> > Issue:  Comparison against a text literal "0.0.0.0"
> >
> > What if the news server host is IPv6 only?  Shouldn't there also be a
> > comparison against "::"?
>
> The address in this case is entirely artificial.  It's checking whether
> this channel is the local channel, whose address is set to 0.0.0.0 when
> the local channel is created, so that it does the right thing with UUCP
> feeds.
>
> It's weird code.  There should probably be some other way of checking
> for the local channel.

Interesting that some other string (e.g. "", "none", or "uucp") didn't come
to mind when this code was written.  I still think that having an IPv4
literal could cause a future problem, but as noted, it seems to affect only
the "s" variable in the newsfeeds file "W" parameter (and things that use
it, such as the logs).

Re: Might this be a (future) bug that needs correction? (INN 2.4.5)
#79497
Author: Russ Allbery
Date: Mon, 29 Sep 2008 19:57
14 lines
1622 bytes
"D. Stussy" <spam@bde-arc.ampr.org> writes:

> Interesting that some other string (e.g. "", "none", or "uucp") didn't
> come to mind when this code was written.

That's because the place it's stored in the struct isn't a string, it's an
address, so the artificial IPv4 IPADDR_ANY address was stored as a
distinguished value.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads