DNS lookup fails on truncated DNS replies #157

Closed
opened 2026-10-05 04:01:45 +02:00 by adam · 3 comments
Owner

I'm not sure what is going on in EC2 right now, but an nslookup irc.freenode.net on the EC2 DNS servers gives back the following:

ubuntu@staging-omnibus-001:~$ nslookup irc.freenode.net 
;; Truncated, retrying in TCP mode.
Server:     172.16.0.23
Address:    172.16.0.23#53

Non-authoritative answer:
irc.freenode.net    canonical name = chat.freenode.net.
Name:   chat.freenode.net
Address: 213.92.8.4
Name:   chat.freenode.net
Address: 213.179.58.83
Name:   chat.freenode.net
...

Note the "truncated" message up top.

In this case, ZNC's DNS lookup fails. I'm sure this is probably an issue with Ares or something, but I decided to report it here so that the people who better know about this can choose to push it back upstream or maybe even fix it somehow.

Thanks!

I'm not sure what is going on in EC2 right now, but an `nslookup irc.freenode.net` on the EC2 DNS servers gives back the following: ``` ubuntu@staging-omnibus-001:~$ nslookup irc.freenode.net ;; Truncated, retrying in TCP mode. Server: 172.16.0.23 Address: 172.16.0.23#53 Non-authoritative answer: irc.freenode.net canonical name = chat.freenode.net. Name: chat.freenode.net Address: 213.92.8.4 Name: chat.freenode.net Address: 213.179.58.83 Name: chat.freenode.net ... ``` Note the "truncated" message up top. In this case, ZNC's DNS lookup fails. I'm sure this is probably an issue with Ares or something, but I decided to report it here so that the people who better know about this can choose to push it back upstream or maybe even fix it somehow. Thanks! <!-- github-sync-id:7707005 -->
adam closed this issue 2026-10-05 04:01:45 +02:00
Author
Owner

Try 1.0beta/nightly/git version. It doesn't use c-ares anymore.

Try 1.0beta/nightly/git version. It doesn't use c-ares anymore. <!-- github-comment-id:9600205 -->
Author
Owner

Hm, I still see a lot of Ares methods in the git source code? Am I looking at the wrong branch? (master) I don't know the code well though, but I'd love to see what you're doing now.

Hm, I still see a lot of Ares methods in the git source code? Am I looking at the wrong branch? (master) I don't know the code well though, but I'd love to see what you're doing now. <!-- github-comment-id:9621642 -->
Author
Owner

ZNC uses Csocket for networking stuff. It's kinda separate project.
Csocket wasn't modified not to use c-ares anymore, but ZNC just compiles now without #define needed to support c-ares in Csocket.
Instead, now DNS is resolved on ZNC side, not at Csocket, using threads and getaddrinfo()

ZNC uses [Csocket](https://github.com/jimloco/csocket) for networking stuff. It's kinda separate project. Csocket wasn't modified not to use c-ares anymore, but ZNC just compiles now without `#define` needed to support c-ares in Csocket. Instead, now DNS is resolved on ZNC side, not at Csocket, using threads and `getaddrinfo()` <!-- github-comment-id:9627130 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#157