]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
[svn] - fix a possible problem with ipv6
authornenolod <redacted>
Fri, 6 Jul 2007 07:54:54 +0000 (00:54 -0700)
committernenolod <redacted>
Fri, 6 Jul 2007 07:54:54 +0000 (00:54 -0700)
ChangeLog
extensions/ip_cloaking.c
include/serno.h

index 3999c502d0a14c05a5ecc555a0cfb474ee0b40a4..a818435770e3d748478e6742e6827ab36824a17f 100644 (file)
--- 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
 jilles      2007/06/30 22:15:35 UTC    (20070630-3520)
   Log:
   monitor: send the same message buffer to all users
index 0f0932c930ffdd63e5eb78c61945238770dac3ba..e7598bb882bb0226e9d4a5c1e5675cb6b8003526 100644 (file)
@@ -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"
 
 #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,
 };
 
 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)
 
 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, '.');
 
        strncpy(buf, inbuf, HOSTLEN);
        tptr = strrchr(buf, '.');
+
+       if (tptr == NULL)
+               return;
+
        *tptr++ = '\0';
 
        snprintf(outbuf, HOSTLEN, "%s.%x", buf, accum);
        *tptr++ = '\0';
 
        snprintf(outbuf, HOSTLEN, "%s.%x", buf, accum);
index 9da9fb46ae78fcaefac184cadfb8730a41aa58b1..b73588ea0062fd6eae7d2e9cd3fc6e143a1422c6 100644 (file)
@@ -1 +1 @@
-#define SERNO "20070630-3520"
+#define SERNO "20070706-3522"