[IPv6 IRC-DEV] [CVS] Module ipv6: Change committed
Brought to you by:
zolty
|
From: Toni G. <zo...@us...> - 2003-02-16 17:43:44
|
CVSROOT : /cvsroot/irc-dev
Module : ipv6
Commit time: 2003-02-16 17:43:42 UTC
Modified files:
CAMBIOS.Ipv6 Ipv6.zoltan include/inet.h include/match.h
include/patchlevel.h include/support.h ircd/IPcheck.c ircd/ircd.c
ircd/match.c ircd/numnicks.c ircd/res.c ircd/s_bsd.c
ircd/s_conf.c ircd/s_misc.c ircd/s_serv.c ircd/s_user.c
Log message:
INET6.22
---------------------- diff included ----------------------
Index: ipv6/CAMBIOS.Ipv6
diff -u ipv6/CAMBIOS.Ipv6:1.21 ipv6/CAMBIOS.Ipv6:1.22
--- ipv6/CAMBIOS.Ipv6:1.21 Sat Feb 8 13:02:53 2003
+++ ipv6/CAMBIOS.Ipv6 Sun Feb 16 09:43:31 2003
@@ -1,3 +1,10 @@
+* 2003/02/16 zo...@ir... INET6.22
+-----------------------------------------------------------------------
+Adaptacion de CALCULATE_HASH al IPv6, y por lo tanto los clones, throttle,
+son 100% operativos.
+En getsockopt() el IP_OPTIONS esta incompleto con el IPv6, parche facilitado
+por the_butche.
+
* 2003/02/08 zo...@ir... INET6.21
-----------------------------------------------------------------------
Nueva funcion inetntoa_cptr() para imprimir la ip de tanto users locales
Index: ipv6/Ipv6.zoltan
diff -u ipv6/Ipv6.zoltan:1.17 ipv6/Ipv6.zoltan:1.18
--- ipv6/Ipv6.zoltan:1.17 Sat Feb 8 13:02:53 2003
+++ ipv6/Ipv6.zoltan Sun Feb 16 09:43:31 2003
@@ -3,16 +3,16 @@
Pasos para el desarrollo del soporte IPv6 para el ircd de ESNET-Hispano:
- A) Adaptar el CALCULATE_HASH de IPcheck.c a IPv6 y activar todos los IP*().
-
- B) Revisar la resolucion DNS, en principio usaremos el RFC antiguo, es decir
+ A) Revisar la resolucion DNS, en principio usaremos el RFC antiguo, es decir
ip6.int para la inversa y registro AAAA para la directa.
Mas tarde migrar a ip6.arpa para inversa y registro A6 para directa.
+ Ya estamos usando ip6.arpa, y al parecer solo resuelve a los usuarios con IPv6
+ y al ipv4 se pone tonto.
- C) Comprobar el bind() de los sockets teniendo activado y desactivado la opcion
+ B) Comprobar el bind() de los sockets teniendo activado y desactivado la opcion
VIRTUALHOST del config.
- D) Comprobar todo lo que afecta al fichero match.c (Comparacion de ip's) y el correcto
+ C) Comprobar todo lo que afecta al fichero match.c (Comparacion de ip's) y el correcto
funcionamiento de las cosas que utilizan match*(). Ejemplos:
1) Hostmask O lines.
2) Hostmask C y N lines.
@@ -21,11 +21,14 @@
5) Hostmask G lines.
6) Bans, Silences, etc..
- E) Para las IP's Virtuales, preguntar a jcea para elegir opcion adecuada. Opciones:
+ D) Para las IP's Virtuales, preguntar a jcea para elegir opcion adecuada. Opciones:
1) Ip virtual corta para ipv4 y larga para ipv6
2) Igual tamanio para ipv4 y ipv6.
Teniendo en cuenta que en IPv4 se usan 6 caracteres mas 6 caracteres de entropia,
para ipv6 serian 22 caracteres mas ¿6? ¿11? caracteres de entropia (Hacer calculos).
+
+ E) Comprobar el /CONNECT manual y el connect automatico, al parecer no chuta bien, que
+ se hace un lio (Segun el debug.log).
F) Compilar en SunOs, Solaris, HP-UX, etc..
Index: ipv6/include/inet.h
diff -u ipv6/include/inet.h:1.10 ipv6/include/inet.h:1.11
--- ipv6/include/inet.h:1.10 Sat Feb 8 13:02:53 2003
+++ ipv6/include/inet.h Sun Feb 16 09:43:32 2003
@@ -65,6 +65,10 @@
#if defined(__FreeBSD__)
#undef IN6_IS_ADDR_V4MAPPED
+#endif
+
+/* ::ffff:a.b.c.d */
+#ifndef IN6_IS_ADDR_V4MAPPED
#define IN6_IS_ADDR_V4MAPPED(a) \
(((const unsigned int *) (a))[0] == 0 \
&& ((const unsigned int *) (a))[1] == 0 \
@@ -119,7 +123,7 @@
#define WHOSTENTP(x) (x)
-/* Localhost loopback */
+/* Localhost loopback 127.0.0.1 */
#ifndef IN_LOOPBACKNET
#define IN_LOOPBACKNET 0x7f /* 127 */
#endif
@@ -129,7 +133,7 @@
#define INADDR_ANY 0x00000000
#endif
-/* Indica un error 255.255.255.255 */
+/* 255.255.255.255 */
#ifndef INADDR_NONE
#define INADDR_NONE 0xffffffff
#endif
@@ -163,7 +167,7 @@
/*
* IP mas larga posible
*/
-#define IPLEN 46
+#define IPLEN IP6LEN
#endif /* INET_H */
Index: ipv6/include/match.h
diff -u ipv6/include/match.h:1.5 ipv6/include/match.h:1.6
--- ipv6/include/match.h:1.5 Wed Jan 29 12:14:55 2003
+++ ipv6/include/match.h Sun Feb 16 09:43:32 2003
@@ -15,12 +15,12 @@
struct in_mask {
#ifdef INET6
- /* still IPv4 */
+ /* No hay estructuras IPv6 */
struct in_addr bits;
struct in_addr mask;
#else
- struct IN_ADDR bits;
- struct IN_ADDR mask;
+ struct in_addr bits;
+ struct in_addr mask;
#endif
int fall;
};
Index: ipv6/include/patchlevel.h
diff -u ipv6/include/patchlevel.h:1.22 ipv6/include/patchlevel.h:1.23
--- ipv6/include/patchlevel.h:1.22 Sat Feb 8 13:02:53 2003
+++ ipv6/include/patchlevel.h Sun Feb 16 09:43:32 2003
@@ -49,7 +49,7 @@
\
\
\
- "+INET6.21"
+ "+INET6.22"
/*
* Deliberate empty lines
Index: ipv6/include/support.h
diff -u ipv6/include/support.h:1.7 ipv6/include/support.h:1.8
--- ipv6/include/support.h:1.7 Sat Feb 8 13:02:54 2003
+++ ipv6/include/support.h Sun Feb 16 09:43:32 2003
@@ -16,7 +16,7 @@
#endif
extern void dumpcore(const char *pattern, ...)
__attribute__ ((format(printf, 1, 2)));
-extern char *inetntoa(struct IN_ADDR);
+extern char *inetntoa(struct IN_ADDR in);
extern char *inetntoa_cptr(aClient *cptr);
#ifdef INET6
extern int inetpton(int af, const char *src, void *dst);
Index: ipv6/ircd/IPcheck.c
diff -u ipv6/ircd/IPcheck.c:1.7 ipv6/ircd/IPcheck.c:1.8
--- ipv6/ircd/IPcheck.c:1.7 Wed Jan 29 12:14:56 2003
+++ ipv6/ircd/IPcheck.c Sun Feb 16 09:43:32 2003
@@ -39,7 +39,7 @@
#include "support.h"
#endif
-RCSTAG_CC("$Id: IPcheck.c,v 1.7 2003/01/29 20:14:56 zolty Exp $");
+RCSTAG_CC("$Id: IPcheck.c,v 1.8 2003/02/16 17:43:32 zolty Exp $");
extern aClient me;
extern time_t now;
@@ -98,23 +98,38 @@
* Calculate a `hash' value between 0 and HASHTABSIZE, from the internet address `IN_ADDR'.
* Apply it immedeately to the table, effectively hiding the table itself.
*/
-#ifdef INET61
+#ifdef INET6
/*
* CALCULATE_HASH for IPv6 address
*/
-/* FIXME-ZOLTAN: Adaptar el hash al ipv6 */
-#define CALCULATE_HASH(IN_ADDR) \
+#define CALCULATE_HASH(in6_addr) \
struct IPregistry_vector *hash; \
- do { register char *ip; \
- memcpy(&ip, (IN_ADDR).S_ADDR, sizeof(struct IN_ADDR)); \
- hash = &IPregistry_hashtable[ip]; } while(0)
-#else
+ if (IN6_IS_ADDR_V4MAPPED(&in6_addr)) \
+ { \
+ unsigned int ip = (in6_addr).s6_addr32[3]; \
+ hash = &IPregistry_hashtable[((ip >> 14) + (ip >> 7) + ip) & (HASHTABSIZE - 1)]; \
+ } \
+ else \
+ { \
+ unsigned int ip; \
+ unsigned int res; \
+ ip = (in6_addr).s6_addr32[0]; \
+ res = ((ip >> 14) + (ip >> 7) + ip); \
+ ip = (in6_addr).s6_addr32[1]; \
+ res = (res | ((ip >> 14) + (ip >> 7) + ip)); \
+ ip = (in6_addr).s6_addr32[2]; \
+ res = (res | ((ip >> 14) + (ip >> 7) + ip)); \
+ ip = (in6_addr).s6_addr32[3]; \
+ res = (res | ((ip >> 14) + (ip >> 7) + ip)); \
+ hash = &IPregistry_hashtable[res & (HASHTABSIZE - 1)]; \
+ }
+#else /* !INET6 */
/*
* CALCULATE_HASH for IPv4 address
*/
-#define CALCULATE_HASH(IN_ADDR) \
+#define CALCULATE_HASH(in_addr) \
struct IPregistry_vector *hash; \
- do { register unsigned int ip = (IN_ADDR).S_ADDR; \
+ do { register unsigned int ip = (in_addr).s_addr; \
hash = &IPregistry_hashtable[((ip >> 14) + (ip >> 7) + ip) & (HASHTABSIZE - 1)]; } while(0)
#endif /* INET6 */
Index: ipv6/ircd/ircd.c
diff -u ipv6/ircd/ircd.c:1.6 ipv6/ircd/ircd.c:1.7
--- ipv6/ircd/ircd.c:1.6 Wed Jan 29 12:14:56 2003
+++ ipv6/ircd/ircd.c Sun Feb 16 09:43:32 2003
@@ -51,6 +51,7 @@
#ifdef VIRTUAL_HOST
#include <sys/socket.h> /* Needed for AF_INET on some OS */
#endif
+
#include <assert.h>
#include "h.h"
@@ -77,7 +78,7 @@
#include "IPcheck.h"
#include "s_bdd.h"
-RCSTAG_CC("$Id: ircd.c,v 1.6 2003/01/29 20:14:56 zolty Exp $");
+RCSTAG_CC("$Id: ircd.c,v 1.7 2003/02/16 17:43:32 zolty Exp $");
extern void init_counters(void);
Index: ipv6/ircd/match.c
diff -u ipv6/ircd/match.c:1.3 ipv6/ircd/match.c:1.4
--- ipv6/ircd/match.c:1.3 Sat Sep 14 15:44:51 2002
+++ ipv6/ircd/match.c Sun Feb 16 09:43:32 2003
@@ -24,7 +24,7 @@
#include "match.h"
#include "ircd.h"
-RCSTAG_CC("$Id: match.c,v 1.3 2002/09/14 22:44:51 zolty Exp $");
+RCSTAG_CC("$Id: match.c,v 1.4 2003/02/16 17:43:32 zolty Exp $");
/*
* mmatch()
@@ -1007,12 +1007,12 @@
while (*m++);
#ifdef INET6
- /* still IPv4 */
+ /* No hay estructuras IPv6 */
imask->bits.s_addr = htonl(bits);
imask->mask.s_addr = htonl(filt);
#else
- imask->bits.S_ADDR = htonl(bits);
- imask->mask.S_ADDR = htonl(filt);
+ imask->bits.s_addr = htonl(bits);
+ imask->mask.s_addr = htonl(filt);
#endif
imask->fall = unco;
return ((bits & ~filt) ? -1 : 0);
Index: ipv6/ircd/numnicks.c
diff -u ipv6/ircd/numnicks.c:1.3 ipv6/ircd/numnicks.c:1.4
--- ipv6/ircd/numnicks.c:1.3 Sat Feb 8 13:02:54 2003
+++ ipv6/ircd/numnicks.c Sun Feb 16 09:43:32 2003
@@ -16,8 +16,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: numnicks.c,v 1.3 2003/02/08 21:02:54 zolty Exp $
+ * $Id: numnicks.c,v 1.4 2003/02/16 17:43:32 zolty Exp $
*/
+
#include "sys.h"
#include "numnicks.h"
#include "inet.h"
@@ -34,7 +35,7 @@
#include <assert.h>
-RCSTAG_CC("$Id: numnicks.c,v 1.3 2003/02/08 21:02:54 zolty Exp $");
+RCSTAG_CC("$Id: numnicks.c,v 1.4 2003/02/16 17:43:32 zolty Exp $");
/*
* Numeric nicks are new as of version ircu2.10.00beta1.
Index: ipv6/ircd/res.c
diff -u ipv6/ircd/res.c:1.9 ipv6/ircd/res.c:1.10
--- ipv6/ircd/res.c:1.9 Fri Feb 7 11:36:38 2003
+++ ipv6/ircd/res.c Sun Feb 16 09:43:32 2003
@@ -42,7 +42,7 @@
#include "common.h"
#include "sprintf_irc.h"
-RCSTAG_CC("$Id: res.c,v 1.9 2003/02/07 19:36:38 zolty Exp $");
+RCSTAG_CC("$Id: res.c,v 1.10 2003/02/16 17:43:32 zolty Exp $");
#define MAXPACKET 1024
@@ -227,11 +227,14 @@
{
_res.nscount = 1;
#ifdef INET6
- /* still IPv4 */
+ /* No hay estructuras IPv6 */
+/* FIXME-ZOLTAN
+ _res.nsaddr_list[0].sin_addr.s_addr = inet_addr("127.0.0.1");
+*/
_res.nsaddr_list[0].sin_addr.s_addr =
inet_pton(AF_INET, "127.0.0.1", &_res.nsaddr_list[0].sin_addr.s_addr);
#else
- _res.nsaddr_list[0].SIN_ADDR.S_ADDR = inet_addr("127.0.0.1");
+ _res.nsaddr_list[0].sin_addr.s_addr = inet_addr("127.0.0.1");
#endif
}
#ifdef DEBUGMODE
@@ -240,10 +243,10 @@
alarm(2);
#ifdef INET6
- /* still IPv4 */
+ /* No hay estructuras IPv6 */
fd = socket(AF_INET, SOCK_DGRAM, 0);
#else
- fd = socket(AFINET, SOCK_DGRAM, 0);
+ fd = socket(AF_INET, SOCK_DGRAM, 0);
#endif
alarm(0);
if (fd < 0)
@@ -256,10 +259,10 @@
*/
alarm(2);
#ifdef INET6
- /* still IPv4 */
+ /* No hay estructuras IPv6 */
if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
#else
- if ((fd = socket(AFINET, SOCK_DGRAM, 0)) < 0)
+ if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
#endif
{
alarm(0);
@@ -467,10 +470,10 @@
for (i = 0; i < max; ++i)
{
#ifdef INET6
- /* still IPv4 */
+ /* No hay estructuras IPv6 */
_res.nsaddr_list[i].sin_family = AF_INET;
#else
- _res.nsaddr_list[i].SIN_FAMILY = AFINET;
+ _res.nsaddr_list[i].sin_family = AF_INET;
#endif
if (sendto(resfd, msg, len, 0, (struct SOCKADDR *)&(_res.nsaddr_list[i]),
sizeof(struct SOCKADDR)) == len)
@@ -526,6 +529,7 @@
{
aCache *cp;
+ Debug((DEBUG_DNS, "Resolver: gethost_byname_type %s", name));
reinfo.re_na_look++;
if ((cp = find_cache_name(name)))
return (struct hostent *)&(cp->he);
@@ -549,6 +553,7 @@
{
aCache *cp;
+ Debug((DEBUG_DNS, "Resolver: gethost_byaddr %s", inetntoa(*addr)));
reinfo.re_nu_look++;
if ((cp = find_cache_number(NULL, addr)))
return &cp->he.h;
@@ -965,10 +970,10 @@
Reg2 ResRQ *rptr = NULL;
aCache *cp = NULL;
#ifdef INET6
- /* still IPv4 */
+ /* No hay estructuras IPv6 */
struct sockaddr_in sin;
#else
- struct SOCKADDR_IN sin;
+ struct sockaddr_in sin;
#endif
int a, max;
size_t rc, len = sizeof(sin);
@@ -1012,14 +1017,15 @@
for (a = 0; a < max; a++)
{
#ifdef INET6
- /* still IPv4 */
+ /* No hay estructuras IPv6 */
if (!_res.nsaddr_list[a].sin_addr.s_addr ||
!memcmp((char *)&sin.sin_addr, (char *)&_res.nsaddr_list[a].sin_addr,
sizeof(struct in_addr)))
#else
- if (!_res.nsaddr_list[a].SIN_ADDR.S_ADDR ||
- !memcmp((char *)&sin.SIN_ADDR, (char *)&_res.nsaddr_list[a].SIN_ADDR,
- sizeof(struct IN_ADDR)))
+ /* No hay estructuras IPv6 */
+ if (!_res.nsaddr_list[a].sin_addr.s_addr ||
+ !memcmp((char *)&sin.sin_addr, (char *)&_res.nsaddr_list[a].sin_addr,
+ sizeof(struct in_addr)))
#endif
break;
}
Index: ipv6/ircd/s_bsd.c
diff -u ipv6/ircd/s_bsd.c:1.10 ipv6/ircd/s_bsd.c:1.11
--- ipv6/ircd/s_bsd.c:1.10 Fri Feb 7 11:36:38 2003
+++ ipv6/ircd/s_bsd.c Sun Feb 16 09:43:32 2003
@@ -105,7 +105,7 @@
#include "msg.h"
#endif
-RCSTAG_CC("$Id: s_bsd.c,v 1.10 2003/02/07 19:36:38 zolty Exp $");
+RCSTAG_CC("$Id: s_bsd.c,v 1.11 2003/02/16 17:43:32 zolty Exp $");
#define IP_LOOKUP_START ":%s NOTICE IP_LOOKUP :*** Looking up your hostname...\r\n"
#define IP_LOOKUP_OK ":%s NOTICE IP_LOOKUP :*** Found your hostname.\r\n"
@@ -767,7 +767,7 @@
** Gestion Distribuida de Clones
*/
-#if defined(BDD) && defined(BDD_CLONES) && !defined(INET6)
+#if defined(BDD) && defined(BDD_CLONES)
if (hp)
{
@@ -1331,6 +1331,10 @@
if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (OPT_TYPE *)&opt, sizeof(opt)) < 0)
report_error("setsockopt(SO_SNDBUF) %s: %s", cptr);
#endif
+#ifndef INET6
+/*
+ * En getsockopt() el IP_OPTIONS esta incompleto con el IPv6
+ */
#if defined(IP_OPTIONS) && defined(IPPROTO_IP)
{
char *s = readbuf, *t = readbuf + sizeof(readbuf) / 2;
@@ -1348,6 +1352,7 @@
report_error("setsockopt(IP_OPTIONS) %s: %s", cptr);
}
#endif
+#endif /* !INET6 */
}
int get_sockerr(aClient *cptr)
@@ -1536,7 +1541,6 @@
* If it is a connection to a user port and if the site has been throttled,
* reject the user.
*/
-#ifndef INET6
if (IPcheck_local_connect(acptr) == -1 && IsUserPort(acptr))
{
ircstp->is_ref++;
@@ -1544,7 +1548,7 @@
"Your host is trying to (re)connect too fast -- throttled");
return NULL;
}
-#endif /* INET6 */
+
#ifdef PROXY_PROTECTION
if (IsUserPort(acptr))
{
Index: ipv6/ircd/s_conf.c
diff -u ipv6/ircd/s_conf.c:1.7 ipv6/ircd/s_conf.c:1.8
--- ipv6/ircd/s_conf.c:1.7 Wed Jan 29 12:14:56 2003
+++ ipv6/ircd/s_conf.c Sun Feb 16 09:43:32 2003
@@ -74,7 +74,7 @@
#include "hash.h"
#include "fileio.h"
-RCSTAG_CC("$Id: s_conf.c,v 1.7 2003/01/29 20:14:56 zolty Exp $");
+RCSTAG_CC("$Id: s_conf.c,v 1.8 2003/02/16 17:43:32 zolty Exp $");
static int check_time_interval(char *, char *);
static int lookup_confhost(aConfItem *);
@@ -288,10 +288,8 @@
{
/* Refuse connections when there are already <digit> clients connected with the same IP number */
unsigned short nr = *aconf->passwd - '0';
-#ifndef INET6
if (IPcheck_nr(cptr) > nr)
return ACR_TOO_MANY_FROM_IP; /* Already got nr with that ip# */
-#endif
}
#ifdef USEONE
else if (!strcmp(aconf->passwd, "ONE"))
Index: ipv6/ircd/s_misc.c
diff -u ipv6/ircd/s_misc.c:1.8 ipv6/ircd/s_misc.c:1.9
--- ipv6/ircd/s_misc.c:1.8 Sat Feb 8 13:02:55 2003
+++ ipv6/ircd/s_misc.c Sun Feb 16 09:43:32 2003
@@ -65,7 +65,7 @@
#include <assert.h>
-RCSTAG_CC("$Id: s_misc.c,v 1.8 2003/02/08 21:02:55 zolty Exp $");
+RCSTAG_CC("$Id: s_misc.c,v 1.9 2003/02/16 17:43:32 zolty Exp $");
static void exit_one_client(aClient *, char *);
@@ -634,10 +634,8 @@
Count_unknowndisconnects(nrof);
/* Update IPregistry */
-#ifndef INET6
if (IsIPChecked(bcptr))
IPcheck_disconnect(bcptr);
-#endif
/*
* Remove from serv->client_list
Index: ipv6/ircd/s_serv.c
diff -u ipv6/ircd/s_serv.c:1.7 ipv6/ircd/s_serv.c:1.8
--- ipv6/ircd/s_serv.c:1.7 Sat Feb 8 13:02:55 2003
+++ ipv6/ircd/s_serv.c Sun Feb 16 09:43:32 2003
@@ -57,7 +57,7 @@
#include "IPcheck.h"
-RCSTAG_CC("$Id: s_serv.c,v 1.7 2003/02/08 21:02:55 zolty Exp $");
+RCSTAG_CC("$Id: s_serv.c,v 1.8 2003/02/16 17:43:32 zolty Exp $");
static int exit_new_server(aClient *cptr, aClient *sptr,
char *host, time_t timestamp, char *fmt, ...)
@@ -861,9 +861,7 @@
tx_num_serie_dbs(cptr);
#endif
-#ifndef INET6
IPcheck_connect_fail(cptr); /* Don't charge this IP# for connecting */
-#endif
}
det_confs_butmask(cptr,
Index: ipv6/ircd/s_user.c
diff -u ipv6/ircd/s_user.c:1.13 ipv6/ircd/s_user.c:1.14
--- ipv6/ircd/s_user.c:1.13 Sat Feb 8 13:02:55 2003
+++ ipv6/ircd/s_user.c Sun Feb 16 09:43:32 2003
@@ -69,7 +69,7 @@
#include "IPcheck.h"
#include "class.h"
-RCSTAG_CC("$Id: s_user.c,v 1.13 2003/02/08 21:02:55 zolty Exp $");
+RCSTAG_CC("$Id: s_user.c,v 1.14 2003/02/16 17:43:32 zolty Exp $");
/* *INDENT-OFF* */
@@ -423,9 +423,7 @@
sendto_op_mask(SNO_TOOMANY, "Too many connections in class for %s.",
sptr->sockhost);
}
-#ifndef INET6
IPcheck_connect_fail(sptr);
-#endif
ircstp->is_ref++;
{
char *msg =
@@ -454,9 +452,7 @@
case ACR_ALREADY_AUTHORIZED:
/* Can this ever happen? */
case ACR_BAD_SOCKET:
-#ifndef INET6
IPcheck_connect_fail(sptr);
-#endif
return exit_client(cptr, sptr, &me, "Unknown error -- Try again");
}
if (IsUnixSocket(sptr))
@@ -486,9 +482,7 @@
{
ircstp->is_ref++;
sendto_one(sptr, err_str(ERR_PASSWDMISMATCH), me.name, parv[0]);
-#ifndef INET6
IPcheck_connect_fail(sptr);
-#endif
return exit_client(cptr, sptr, &me, "Bad Password");
}
@@ -659,9 +653,7 @@
sendbufto_op_mask(SNO_CONNEXIT);
#endif /* SNO_CONNEXIT_IP */
#endif /* ALLOW_SNO_CONNEXIT */
-#ifndef INET6
IPcheck_connect_succeeded(sptr);
-#endif
}
else
/* if (IsServer(cptr)) */
@@ -694,12 +686,10 @@
for (acptr = user->server; acptr != &me; acptr = acptr->serv->up)
if (IsBurst(acptr) || Protocol(acptr) < 10)
break;
-#ifndef INET6
if (IPcheck_remote_connect(sptr, user->host, (acptr != &me)) == -1)
/* We ran out of bits to count this */
return exit_client(cptr, sptr, &me,
"More then 255 connections from this IP number");
-#endif
}
#ifdef NO_PROTOCOL9 /* Use this when all servers are 2.10 (but test it first) --Run */
@@ -1188,9 +1178,7 @@
*/
if (IsUnknown(acptr) && MyConnect(acptr))
{
-#ifndef INET6
IPcheck_connect_fail(acptr);
-#endif
exit_client(cptr, acptr, &me, "Overridden by other sign on");
goto nickkilldone;
}
----------------------- End of diff -----------------------
|