From 514235a76261a431404609eba41f23f231c3505a Mon Sep 17 00:00:00 2001 From: nenolod Date: Fri, 6 Jul 2007 00:54:54 -0700 Subject: [PATCH] [svn] - fix a possible problem with ipv6 --- ChangeLog | 11 +++++++++++ extensions/ip_cloaking.c | 8 ++++++-- include/serno.h | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3999c50..a818435 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +nenolod 2007/07/06 07:48:28 UTC (20070706-3522) + Log: + - new ip cloaking module + + + Changes: Modified: + +1 -0 trunk/extensions/Makefile.in (File Modified) + +246 -33 trunk/extensions/ip_cloaking.c (File Modified) + + - trunk/extensions/ip_cloaking_old.c (File Added) + + jilles 2007/06/30 22:15:35 UTC (20070630-3520) Log: monitor: send the same message buffer to all users diff --git a/extensions/ip_cloaking.c b/extensions/ip_cloaking.c index 0f0932c..e7598bb 100644 --- a/extensions/ip_cloaking.c +++ b/extensions/ip_cloaking.c @@ -1,4 +1,4 @@ -/* $Id: ip_cloaking.c 3522 2007-07-06 07:48:28Z nenolod $ */ +/* $Id: ip_cloaking.c 3524 2007-07-06 07:54:54Z nenolod $ */ #include "stdinc.h" #include "modules.h" @@ -42,7 +42,7 @@ mapi_hfn_list_av1 ip_cloaking_hfnlist[] = { }; DECLARE_MODULE_AV1(ip_cloaking, _modinit, _moddeinit, NULL, NULL, - ip_cloaking_hfnlist, "$Revision: 3522 $"); + ip_cloaking_hfnlist, "$Revision: 3524 $"); static void distribute_hostchange(struct Client *client) @@ -107,6 +107,10 @@ do_host_cloak_ip(const char *inbuf, char *outbuf) strncpy(buf, inbuf, HOSTLEN); tptr = strrchr(buf, '.'); + + if (tptr == NULL) + return; + *tptr++ = '\0'; snprintf(outbuf, HOSTLEN, "%s.%x", buf, accum); diff --git a/include/serno.h b/include/serno.h index 9da9fb4..b73588e 100644 --- a/include/serno.h +++ b/include/serno.h @@ -1 +1 @@ -#define SERNO "20070630-3520" +#define SERNO "20070706-3522"