[cvslog] [CVS] Module eggdrop1.8: Change committed

cvs at eggheads.org cvs at eggheads.org
Mon Dec 10 16:49:55 CST 2012


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.8
Commit time: 2012-12-10 22:49:55 UTC
Committer  : Thomas Sader <thommey at gmail.com>

Modified files:
     doc/Changes1.8 src/match.c src/patch.h

Log message:

Fix match_cidr to always return MATCH if the prefix is 0.

---------------------- diff included ----------------------
Index: eggdrop1.8/doc/Changes1.8
diff -u eggdrop1.8/doc/Changes1.8:1.65 eggdrop1.8/doc/Changes1.8:1.66
--- eggdrop1.8/doc/Changes1.8:1.65	Tue Sep 25 11:24:41 2012
+++ eggdrop1.8/doc/Changes1.8	Mon Dec 10 16:49:45 2012
@@ -1,4 +1,4 @@
-$Id: Changes1.8,v 1.65 2012/09/25 17:24:41 thommey Exp $
+$Id: Changes1.8,v 1.66 2012/12/10 22:49:45 thommey Exp $
 
 Eggdrop Changes (since version 1.8.0)
 
@@ -6,6 +6,9 @@
 
 1.8.0 (CVS):
 
+  - Fix match_cidr to always return MATCH if the prefix is 0.
+    Patch by: thommey / Found by: Robby
+
   - Export the tcl_result* functions to modules. They're required because
     access to interp->result will be removed from Tcl.
     Patch by: thommey / Found by: Nocty
Index: eggdrop1.8/src/match.c
diff -u eggdrop1.8/src/match.c:1.1.1.1 eggdrop1.8/src/match.c:1.2
--- eggdrop1.8/src/match.c:1.1.1.1	Mon Jul 26 15:11:06 2010
+++ eggdrop1.8/src/match.c	Mon Dec 10 16:49:45 2012
@@ -4,7 +4,7 @@
  *   hostmask matching
  *   cidr matching
  *
- * $Id: match.c,v 1.1.1.1 2010/07/26 21:11:06 simple Exp $
+ * $Id: match.c,v 1.2 2012/12/10 22:49:45 thommey Exp $
  *
  * Once this code was working, I added support for % so that I could
  * use the same code both in Eggdrop and in my IrcII client.
@@ -332,7 +332,7 @@
   u_8bit_t block[16], addr[16];
 
   if (count < 1)
-    return NOMATCH;
+    return 1;
   if (strchr(m, ':') || strchr(n, ':')) {
     af = AF_INET6;
     if (count > 128)
@@ -353,7 +353,9 @@
 #else
   IP block, addr;
 
-  if (count < 1 || count > 32)
+  if (count < 1)
+    return 1;
+  if (count > 32)
     return NOMATCH;
   block = ntohl(inet_addr(m));
   addr = ntohl(inet_addr(n));
Index: eggdrop1.8/src/patch.h
diff -u eggdrop1.8/src/patch.h:1.45 eggdrop1.8/src/patch.h:1.46
--- eggdrop1.8/src/patch.h:1.45	Tue Sep 25 11:24:41 2012
+++ eggdrop1.8/src/patch.h	Mon Dec 10 16:49:45 2012
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.45 2012/09/25 17:24:41 thommey Exp $
+ * $Id: patch.h,v 1.46 2012/12/10 22:49:45 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1348593531");            /* current unixtime */
+patch("1355179546");            /* current unixtime */
 /*
  *
  *
  */
-patch("modtclresult");
+patch("cidrzeromatch");
 /*
  *
  *
----------------------- End of diff -----------------------


More information about the Changes mailing list