Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipv6 chat preference #1410

Open
thommey opened this issue Feb 13, 2023 · 4 comments
Open

ipv6 chat preference #1410

thommey opened this issue Feb 13, 2023 · 4 comments

Comments

@thommey
Copy link
Member

thommey commented Feb 13, 2023

This .dcc output

17:17.35 < mondino> [11:17:23] #mondino# dccstat
17:17.35 < mondino> IDX ADDR                                     + PORT NICK      TYPE  INFO
17:17.35 < mondino> --- ---------------------------------------- ------ --------- ----- ---------
17:17.35 < mondino> 5   X.Y.Z.196                            103xx (telnet)  lstn  103xx
17:17.35 < mondino> 8   X:Y:Z:37::2                       6667 (server)  serv  (lag: 0)

leads to a dcc chat reply to /ctcp chat with the ipv6 address that is used to connect to the ircd instead of the only ipv4 address it listens on. I don't think that should ever happen. prefer-ipv6 is 1 but it doesn't listen on ipv6

Found by: mondino

@vanosg
Copy link
Member

vanosg commented Feb 13, 2023

Can you clarify the problem with more detail?

@thommey
Copy link
Member Author

thommey commented Feb 13, 2023

ctcp.mod automatically attempts to figure out the address to respond with after /ctcp bot chat. It sends DCC CHAT <botip> <botport> to make the user connect to itself.
In the example above, the listen-addr (or listen X.X.X.X 103xx all) was IPv4, and yet, the response includes an ipv6 address it doesn't even listen on, that is pointless, the user cannot connect to that.
Example:

# eggdrop.conf
set prefer-ipv6 1
set vhost6 200a:2003::1
listen 10.0.0.1 3333 all

The bot then responds with DCC CHAT 200a:2003::1 3333 which the bot does not listen on

@thommey
Copy link
Member Author

thommey commented Mar 23, 2023

Broken by #1162

@michaelortmann
Copy link
Member

michaelortmann commented Nov 30, 2023

Is it really a bug? Would it really be a fix to ignore vhost* and send a listen address?

If you have eggdrop on a box in a local network, lets say ipv4 192.168.0.x, and you do Network address translation (NAT) on your router, which has public ipv6, and you want someone from the internet to dcc to your bot, you would setup port forwarding on your router. If you also want someone from the internet to ctcp chat to your bot, your bot must not send its local listen address via dcc chat, but the address of the router and the port the router listens on for forwarding to your bot. How would you do this? I would try to set vhost/vhost6. If the router only has a public ipv6, i would configure it like in your example. prefer-ipv6 is a kinda global setting for eggdrop that could interfere.

Eggdrop cannot check or know, if a forwarding address is valid for dcc chat or not, it can only blindly use, what is configured by vhost/vhost6.

A workaround could be to use the IP the irc server sees the bot coming from. but in this case, what about the port number?

Do we need to introduce additional config variables to dewarp the situation?

The bug is complex and without more information / feedback i cannot "just fix".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants