numerous bugs present in 7.2.0

ThaPrince thaprince at gmail.com
Mon Jan 30 14:26:43 EST 2006


Hello,

I have found numerous bugs in ircd-hybrid 7.2.0 as can be seen below:

- sockhost is not properly relayed
- match was called wrong causing xlines to fail.
- Soft caller ID does not function correctly.
- channel list formatting is broken

Patch to fix the first 3 issues is below:

The 4th issue is something introduced with the new nuh code. you can
replicate it like so:

/mode #Channel +bbb nick1 nick2 nick3

The same is true for any of the lists that take parameters in such a
fashion.

and look at the output.

Regards,

Jon

Index: src/s_user.c
===================================================================
--- src/s_user.c        (revision 380)
+++ src/s_user.c        (working copy)
@@ -619,8 +619,7 @@
                  source_p->name, source_p->hopcount+1,
                 (unsigned long)source_p->tsinfo,
                  ubuf, source_p->username, source_p->host,
-                ((MyClient(source_p) && !IsIPSpoof(source_p)) ?
-                source_p->sockhost : "0"),
+                IsIPSpoof(source_p) ? "0" : source_p->sockhost,
                  source_p->id, source_p->info);
     }
     else
@@ -648,7 +647,7 @@
                    source_p->name, source_p->hopcount+1,
                   (unsigned long)source_p->tsinfo,
                    ubuf, source_p->username, source_p->host,
-
((MyClient(source_p)&&!IsIPSpoof(source_p))?source_p->sockhost:"0"),
+                  IsIPSpoof(source_p) ? "0" : source_p->sockhost,
                    source_p->id, source_p->info);
       else
         sendto_one(server, "NICK %s %d %lu %s %s %s %s :%s",
Index: src/client.c
===================================================================
--- src/client.c        (revision 380)
+++ src/client.c        (working copy)
@@ -1231,11 +1231,13 @@
   }

   if (IsSoftCallerId(target))
-  {
     DLINK_FOREACH(ptr, target->channel.head)
-      if (IsMember(source, ptr->data))
+    {
+      struct Channel *chptr = ((struct Membership *) ptr->data)->chptr;
+
+      if (IsMember(source, chptr))
         return (1);
-  }
+    }

   return (0);
 }
Index: src/s_serv.c
===================================================================
--- src/s_serv.c        (revision 380)
+++ src/s_serv.c        (working copy)
@@ -892,8 +892,8 @@
               target_p->name, target_p->hopcount + 1,
               (unsigned long) target_p->tsinfo,
               ubuf, target_p->username, target_p->host,
-
((MyClient(target_p)&&!IsIPSpoof(target_p))?target_p->sockhost:"0"),
-          target_p->id, target_p->info);
+              IsIPSpoof(target_p) ? "0" : target_p->sockhost,
+              target_p->id, target_p->info);
   else
     sendto_one(client_p, "NICK %s %d %lu %s %s %s %s :%s",
               target_p->name, target_p->hopcount + 1,
Index: modules/m_xline.c
===================================================================
--- modules/m_xline.c   (revision 380)
+++ modules/m_xline.c   (working copy)
@@ -235,7 +235,7 @@
                      "XLINE %s %s %s :%s",
                      parv[1], parv[2], parv[3], parv[4]);

-  if (match(parv[1], me.name))
+  if (!match(parv[1], me.name))
     return;

   if (find_matching_name_conf(ULINE_TYPE, source_p->servptr->name,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ircd-hybrid.org/pipermail/hybrid/attachments/20060130/a1abea1e/attachment.html>


More information about the hybrid mailing list