From: Perry Lorier Date: Sat, 16 Dec 2000 07:00:33 +0000 (+0000) Subject: Author: Isomer X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=commitdiff_plain;h=c02105285c8027ba887ca0453b64b8415d5bb8fd Author: Isomer 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 --- diff --git a/ChangeLog b/ChangeLog index 7236e77..1f0909d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2000-12-16 Isomer + * ircd/parse.c: detect if the prefix is missing and try and recover + instead of coring. + 2000-12-15 Kevin L. Mitchell * ircd/ircd_log.c: found and fixed some bugs in the debug logging diff --git a/RELEASE.NOTES b/RELEASE.NOTES index 42dbf24..9113235 100644 --- a/RELEASE.NOTES +++ b/RELEASE.NOTES @@ -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. diff --git a/ircd/parse.c b/ircd/parse.c index b718827..da26232 100644 --- a/ircd/parse.c +++ b/ircd/parse.c @@ -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);