diff --git a/include/hostmask.h b/include/hostmask.h index 1f92b8c..7da2595 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 326d34b..b267014 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 c44d1ff..2a7661d 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 203e600..42c134e 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 5d2581b..e8a9260 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);