[ircd-ratbox] ChanServ UNBAN bug
lee at leeh.co.uk
Tue Jan 29 20:21:45 UTC 2008
On Mon, Jan 28, 2008 at 11:16:15AM +0200, Latchezar Tzvetkoff wrote:
> Well, actually ratbox IRCd supports ban stacking, but services doen't,
> and ban masks like 18.104.22.168/5 will not get found by ChanServ, neither in
> the find_exempt(...) function. However, there's another problem with IP
> bans, too. If I put a ban to an IP that has a PTR (host), the client
> will got banned, and he/she won't can unban through ChanServ, because it
> doesn't resolve the hostnames in client_p->mask (client_p->host, i
> saw...). I've decided to write a patch, and it is available at
> The code is pretty ugly, imho :)
> I hope you find a better way doing it...
I will look into this, but I'm unlikely to port it back to the 1.1 tree so
if you want it there (1.2 is a while off yet) I will give you a few
- The users IP address (if the network is TS6) is already stored
in client_p->user->ip. This is the only trustable source for the IP
address, and DNS lookups really shouldn't be used. If you really do need
this on a TS5 network, then my recommendation is to do the DNS lookup
when the user connects in c_nick() instead.
- The cidr.c I have added into trunk should give you the IP matching code in
an elegant and tested form. match_ips() will match the cidr mask against
the IP, match_cidr() isn't really suitable in this situation.
Any questions, let me know.
- Lee H // anfl
- I code, therefore I break things.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://lists.ratbox.org/pipermail/ircd-ratbox/attachments/20080129/f55b5520/attachment.pgp
More information about the ircd-ratbox