[ircd-ratbox] Re: Protocol Changes?

Tomáš Janoušek tomi at nomi.cz
Fri Mar 12 09:12:49 EST 2004


Hi,
> the bug is very easily reproducible, connect to IPv6 localhost and it will
> announce the nick's host as :1, but hybrid announces it as 0::1 (or even
> .0::1), you know what : means...
As anfl said, it is not so easily reproducible for him, so i looked into and
found where exactly is the problem.

(ircd-ratbox-1.3-1)
s_bsd.c:401 - if sockhost beggins with :, we add 0 to host, but in sockhost
remains "::1". (after some lines we have "0::1" in client->host

s_auth.c:193 - if we found hostname, put it in client->host, so we have there
"localhost" (this depends on DNS server, i have localhost as PTR for ::1 and
127.0.0.1, other may have localhost.localdomain and wouldn't notice this
problem, or may have not PTR for ::1)

s_user.c:341 - we check for hostname validity
s_user.c:659 - no . in "localhost", return NO, invalid hostname
s_user.c:346 - hostname is invalid, copy in client->sockhost => now we have
"::1" in client->host, and this IS bad

(in hybrid7, there is no . checking in valid_hostname, so it would result in
"localhost" hostname without problems)

Yours sincerely,
-- 
.--------------------------------.   .--------------------------.   .---------.
| _________              __ _    |===|      Tomáš Janoušek      |===|o---.  o |
||_________|  _         |_/| |   |===| NOMI team     programmer |===||.--+--' |
|    | | ___ | '-._.-._  _ | | __|   | e-m at il:    tomi at nomi.cz  |   ||| o+---o|
|    | |/ _ \| .-. .-. || || |/ /|   | web http://tomi.nomi.cz/ |   ||| |`--. |
|    | | (_) | | | | | || ||   ( |===| ICQ:        #161807083   |===||o-'.--+o|
|    |_|\___/|_| |_| |_|___|_|\_\|===| GSM:    +420 608 876 277 |===|oo--'  o |
`--------------------------------'   `--------------------------'   `---------'


More information about the ircd-ratbox mailing list