Author: Isomer <isomer@coders.net>
authorPerry Lorier <isomer@undernet.org>
Sat, 16 Dec 2000 07:00:33 +0000 (07:00 +0000)
committerPerry Lorier <isomer@undernet.org>
Sat, 16 Dec 2000 07:00:33 +0000 (07:00 +0000)
Log message:

Don't core if no prefix is sent over a s<->s link.

Testing required:

Does it still link to other servers? :)

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@343 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
RELEASE.NOTES
ircd/parse.c

index 7236e77e4f3029ea7b3fe7283a0e43a505fc9d01..1f0909d5009c6d010a87af57fc2582bf8283a89f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-12-16  Isomer <Isomer@coders.net>
+       * ircd/parse.c: detect if the prefix is missing and try and recover
+       instead of coring.
+
 2000-12-15  Kevin L. Mitchell  <klmitch@mit.edu>
 
        * ircd/ircd_log.c: found and fixed some bugs in the debug logging
index 42dbf24e3c58e4e615a85a99f247d93b20d2cf9d..911323590ba566fde53c0cc8e3cd3c78cba9f1fd 100644 (file)
@@ -134,4 +134,8 @@ Increase the default hard limit for file descriptors in /etc/system
 set rlim_fd_max = 4096
 The server will raise the soft limit to the hard limit.
 
+Linux 2.2 -- [Tri]/Isomer
+The kernel has a kernel destination cache size of 4096.  If the kernel sees
+more than 4096 IP's in 60s it warns 'dst cache overflow'.  This limit can be
+changed by modifying /proc/sys/net/ipv4/route/max_size.
 
index b718827e02d5aaab03791df3992b2b8b2d818a68..da26232ec4958ffd9f6bc1cbefd851034c118a42 100644 (file)
@@ -996,8 +996,7 @@ int parse_server(struct Client *cptr, char *buffer, char *bufend)
       return 0;
     }
   }
-  else if (Protocol(cptr) > 9)  /* Well, not ALWAYS, 2.9 can send no prefix */
-  {
+  else {
     char numeric_prefix[6];
     int  i;
     for (i = 0; i < 5; ++i) {
@@ -1006,12 +1005,17 @@ int parse_server(struct Client *cptr, char *buffer, char *bufend)
       }
     }
     numeric_prefix[i] = '\0';
+
     /*
      * We got a numeric nick as prefix
      * 1 or 2 character prefixes are from servers
      * 3 or 5 chars are from clients
      */
-    if (' ' == ch[1] || ' ' == ch[2])
+    if (0 == i) {
+      protocol_violation(cptr,"Missing Prefix");
+      from = cptr;
+    }
+    else if (' ' == ch[1] || ' ' == ch[2])
       from = FindNServer(numeric_prefix);
     else 
       from = findNUser(numeric_prefix);