From 9ea3ea10859392b770e02d0087df0a2320730a7d Mon Sep 17 00:00:00 2001 From: Valery Yatsko Date: Sat, 5 Apr 2008 21:20:48 +0400 Subject: [PATCH] Missed some files in r520 commit. --- include/hostmask.h | 4 ++-- include/m_info.h | 2 +- include/s_conf.h | 4 ++-- modules/m_dline.c | 2 +- src/listener.c | 16 ++++++++-------- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/hostmask.h b/include/hostmask.h index 1f92b8c4..7da25951 100644 --- a/include/hostmask.h +++ b/include/hostmask.h @@ -31,7 +31,7 @@ enum { HM_HOST, HM_IPV4 -#ifdef IPV6 +#ifdef RB_IPV6 , HM_IPV6 #endif }; @@ -64,7 +64,7 @@ struct ConfItem *find_dline(struct sockaddr *, int); void report_Klines(struct Client *); void report_auth(struct Client *); -#ifdef IPV6 +#ifdef RB_IPV6 int match_ipv6(struct sockaddr *, struct sockaddr *, int); #endif int match_ipv4(struct sockaddr *, struct sockaddr *, int); diff --git a/include/m_info.h b/include/m_info.h index 326d34b8..b2670143 100644 --- a/include/m_info.h +++ b/include/m_info.h @@ -84,7 +84,7 @@ Info MyInformation[] = { "Maximum Queue Length of Pending Connections"}, #endif /* SOMAXCONN */ -#ifdef IPV6 +#ifdef RB_IPV6 {"IPV6", "ON", 0, "IPv6 Support"}, #else {"IPV6", "OFF", 0, "IPv6 Support"}, diff --git a/include/s_conf.h b/include/s_conf.h index c44d1ffb..2a7661d8 100644 --- a/include/s_conf.h +++ b/include/s_conf.h @@ -271,11 +271,11 @@ struct server_info char *network_desc; int hub; struct sockaddr_in ip; -#ifdef IPV6 +#ifdef RB_IPV6 struct sockaddr_in6 ip6; #endif int specific_ipv4_vhost; -#ifdef IPV6 +#ifdef RB_IPV6 int specific_ipv6_vhost; #endif diff --git a/modules/m_dline.c b/modules/m_dline.c index 203e6001..42c134ec 100644 --- a/modules/m_dline.c +++ b/modules/m_dline.c @@ -154,7 +154,7 @@ mo_dline(struct Client *client_p, struct Client *source_p, const char *creason; int t = AF_INET, ty, b; ty = parse_netmask(dlhost, (struct sockaddr *)&daddr, &b); -#ifdef IPV6 +#ifdef RB_IPV6 if(ty == HM_IPV6) t = AF_INET6; else diff --git a/src/listener.c b/src/listener.c index 5d2581be..e8a92608 100644 --- a/src/listener.c +++ b/src/listener.c @@ -46,7 +46,7 @@ #define INADDR_NONE ((unsigned int) 0xffffffff) #endif -#if defined(NO_IN6ADDR_ANY) && defined(IPV6) +#if defined(NO_IN6ADDR_ANY) && defined(RB_IPV6) static const struct in6_addr in6addr_any = { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } }; #endif @@ -112,7 +112,7 @@ get_listener_name(const listener_t *listener) if(listener == NULL) return NULL; -#ifdef IPV6 +#ifdef RB_IPV6 if(listener->addr.ss_family == AF_INET6) port = ntohs(((const struct sockaddr_in6 *)&listener->addr)->sin6_port); else @@ -138,7 +138,7 @@ show_ports(struct Client *source_p) { sendto_one_numeric(source_p, RPL_STATSPLINE, form_str(RPL_STATSPLINE), 'P', -#ifdef IPV6 +#ifdef RB_IPV6 ntohs(listener->addr.ss_family == AF_INET ? ((struct sockaddr_in *)&listener->addr)->sin_port : ((struct sockaddr_in6 *)&listener->addr)->sin6_port), #else @@ -175,7 +175,7 @@ inetport(listener_t *listener) F = rb_socket(GET_SS_FAMILY(&listener->addr), SOCK_STREAM, 0, "Listener socket"); -#ifdef IPV6 +#ifdef RB_IPV6 if(listener->addr.ss_family == AF_INET6) { struct sockaddr_in6 *in6 = (struct sockaddr_in6 *)&listener->addr; @@ -270,7 +270,7 @@ find_listener(struct rb_sockaddr_storage *addr) } break; } -#ifdef IPV6 +#ifdef RB_IPV6 case AF_INET6: { struct sockaddr_in6 *in6 = (struct sockaddr_in6 *)addr; @@ -323,7 +323,7 @@ add_listener(int port, const char *vhost_ip, int family) if(inetpton(family, vhost_ip, &((struct sockaddr_in *)&vaddr)->sin_addr) <= 0) return; } -#ifdef IPV6 +#ifdef RB_IPV6 else { if(inetpton(family, vhost_ip, &((struct sockaddr_in6 *)&vaddr)->sin6_addr) <= 0) @@ -338,7 +338,7 @@ add_listener(int port, const char *vhost_ip, int family) case AF_INET: ((struct sockaddr_in *)&vaddr)->sin_addr.s_addr = INADDR_ANY; break; -#ifdef IPV6 +#ifdef RB_IPV6 case AF_INET6: memcpy(&((struct sockaddr_in6 *)&vaddr)->sin6_addr, &in6addr_any, sizeof(struct in6_addr)); break; @@ -353,7 +353,7 @@ add_listener(int port, const char *vhost_ip, int family) SET_SS_LEN(&vaddr, sizeof(struct sockaddr_in)); ((struct sockaddr_in *)&vaddr)->sin_port = htons(port); break; -#ifdef IPV6 +#ifdef RB_IPV6 case AF_INET6: SET_SS_LEN(&vaddr, sizeof(struct sockaddr_in6)); ((struct sockaddr_in6 *)&vaddr)->sin6_port = htons(port);