View Issue Details

IDProjectCategoryView StatusLast Update
0001252unrealircdpublic2004-07-22 17:20
Reporterkormat Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionopen 
Product Version3.2-beta17 
Summary0001252: IPv6 todo: improve dns lookup method ip4/ip6
DescriptionA) Connecting via localhost to the server causes the ircd to report the users hosts as localhost.domain.tld.
B) Connecting via external ip causes the connection to hang for exactly 30 seconds.
Steps To ReproduceA:
1. Connect with irc client to localhost:6667
2. Do /who username.
3. See that host is localhost.domain.tld

B:
1. Connect with irc client to ipaddree:6667
2. Connection hangs for 30 seconds
3. Then 'Welcome' line appears and all works fine from there
4. /who reports the ip address, not the machine name
Additional InformationDNS is definetely working correctly. I've done an strace on the ircd as i connect, and i can see it get the correct details from the dns server. I'm using ssl. IPv6 is also enabled, but not being used.
Attached Files
debug.log (4,708 bytes)
3rd party modules

Activities

syzop

2003-09-17 15:50

administrator   ~0003673

Well it works fine here and at thousands of other systems (not that there can't be any bug)...

I've seen A before, so I can confirm that behavior sometimes (never had it here, but..).
Now for B...
1. what's your /etc/resolv.conf nameserver? is it 127.0.0.1 or are you using an external nameserver?
2. verify dns by doing 'host <yourip>' and then 'host <the-hostname-the-previous-query-returned>', like:
# host 192.168.5.220
Name: vulnscan.testnet
Address: 192.168.5.220
# host vulnscan.testnet
vulnscan.testnet A 192.168.5.220

Please post both results back to me.
If you got enough time and are sure that isn't the problem then you can also go directly to the next step:
- compile with debugmode (define it in include/config.h)
- boot the ircd with: src/ircd -x 100
- connect like step B, wait till you get in, and quit immediately
- kill your ircd (kill -15 `cat ircd.pid`)
- send the debug.log that was created to me at [email protected] or attach it here.

On a sidenote, did you try without SSL+IPv6?
FYI, I personally use a SSL+IPv6 compiled UnrealIRCd (ipv6 not used) at debian too (woody&sid).

Have fun.

kormat

2003-09-17 16:32

reporter   ~0003674

1. My /etc/resolv.conf nameserver is an external namesrever, same as in the set::dns::nameserver option in the .conf file.

2. Yup, that all works perfectly

Will recompile and send on the logs.

Tried without ssl, same results, except with one very strange exception. I added a non-ssl port on 6668. I can connect to it as 127.0.0.1:6668, but not as localhost:6668. The connection gets closed immediately with the latter.

kormat

2003-09-17 16:50

reporter   ~0003675

Right, there's the debug.log following your instructions. Hope that helps.

kormat

2003-09-17 17:08

reporter   ~0003676

Last edited: 2003-09-17 17:23

Ah.... I compiled it again without ipv6 support, and the delay goes away. From a look through the debug.log, it looks like it was trying to do a reverse lookup on the ipv6 address of the client and failing. At least, that's my guess.

edited on: 09-17-03 17:23

syzop

2003-09-17 18:17

administrator   ~0003677

well... it's confused because you use 'nonado.net' for that specific ip (ie, the domain, not blabla.domain.something)... it sends a request for ANY record of 'nonado.net' and only gets 4 nameservers back, not any A record.
As you can see even my 'host' tool is confused by it:
syzop:~# host -a nonado.net
nonado.net NS b.ns.bytemark.co.uk
nonado.net NS c.ns.bytemark.co.uk
nonado.net NS d.ns.bytemark.co.uk
nonado.net NS a.ns.bytemark.co.uk
syzop:~# host nonado.net
nonado.net A 212.13.199.185
syzop:~# host -a nonado.net
nonado.net NS b.ns.bytemark.co.uk
nonado.net NS c.ns.bytemark.co.uk
nonado.net NS d.ns.bytemark.co.uk
nonado.net NS a.ns.bytemark.co.uk
nonado.net A 212.13.199.185
it's suddenly there ;p.

I plan to code the DNS stuff a bit differently for IPv6 in the future (after beta18 release, so will be in beta19), then these kinds of nameserver setups will also be supported :).

syzop

2003-11-20 19:29

administrator   ~0004072

postponed to after beta19, sorry :p.

syzop

2004-01-30 03:27

administrator   ~0004794

*bump* want to fix this before next release

syzop

2004-02-05 17:31

administrator   ~0004883

damn, this is quite difficult to do (not theoretically, but with our practical implementation) :|.
Since it's not that important but just a minor glitch in something that is not widely used && the risk involved of crashes/weird behavior after the "fix" is quite high (something I don't want to risk when we are finally getting out of the beta stage)...
I've decided to postpone this for at least 6 months or so.

Sorry kormat / Rocko :|.

Rocko

2004-02-05 20:35

reporter   ~0004885

Oh well, no problem, thats ok ;)

syzop

2004-07-22 17:20

administrator   ~0007222

Fixed in CVS [.109].

Issue History

Date Modified Username Field Change
2003-09-17 14:32 kormat New Issue
2003-09-17 15:50 syzop Note Added: 0003673
2003-09-17 16:32 kormat Note Added: 0003674
2003-09-17 16:49 kormat File Added: debug.log
2003-09-17 16:50 kormat Note Added: 0003675
2003-09-17 17:08 kormat Note Added: 0003676
2003-09-17 17:23 kormat Note Edited: 0003676
2003-09-17 18:17 syzop Note Added: 0003677
2003-09-17 18:21 syzop Status new => confirmed
2003-09-17 18:21 syzop Summary ircd has weird dns handling => IPv6 todo: improve dns lookup method ip4/ip6
2003-11-20 19:29 syzop Note Added: 0004072
2004-01-30 03:27 syzop Note Added: 0004794
2004-02-05 17:31 syzop Note Added: 0004883
2004-02-05 20:35 Rocko Note Added: 0004885
2004-07-22 17:20 syzop Status confirmed => closed
2004-07-22 17:20 syzop Note Added: 0007222