]> git.pld-linux.org Git - packages/apache1-mod_throttle.git/blame - apache1-mod_throttle-PLD-v6stuff.patch
- apxs1 in apache1-devel now
[packages/apache1-mod_throttle.git] / apache1-mod_throttle-PLD-v6stuff.patch
CommitLineData
b3de9be1 1--- mod_throttle-3.1.2/mod_throttle.c Sun Dec 3 11:15:10 2000
187da0f3 2+++ mod_throttle.c Fri Aug 30 11:38:50 2002
3@@ -2788,6 +2788,12 @@
4 if (ap_table_get(r->headers_in, x_is_subrequest) == true)
5 return OK;
b3de9be1 6
187da0f3 7+#ifdef INET6
8+ /* decline if client has an IPv6 address */
9+ if (r->connection->remote_addr.ss_family != AF_INET)
10+ return DECLINED;
11+#endif
b3de9be1 12+
187da0f3 13 /* Avoid throttling status requests, but subject them to
14 * other access controls.
15 */
16@@ -2811,7 +2817,11 @@
b3de9be1 17 * which we will apply the global policy for client connections.
18 */
19 client_ip_config.track = (t_throttle *) get_client_ip(
187da0f3 20+#ifdef INET6
b3de9be1 21+ client_ip_pool, ((struct sockaddr_in *)&r->connection->remote_addr)->sin_addr
187da0f3 22+#else
23 client_ip_pool, r->connection->remote_addr.sin_addr
24+#endif
b3de9be1 25 );
26
27 /* Is it time for the period adjustment? */
187da0f3 28@@ -3185,7 +3195,17 @@
b3de9be1 29 (void) critical_acquire(critical);
30
31 #ifdef THROTTLE_CLIENT_IP
32- client_ip = get_client_ip(client_ip_pool, r->connection->remote_addr.sin_addr);
187da0f3 33+ #ifdef INET6
34+ /* decline if client has an IPv6 address */
35+ if (r->connection->remote_addr.ss_family != AF_INET)
36+ return DECLINED;
37+
38+ client_ip = get_client_ip(client_ip_pool,
39+ ((struct sockaddr_in *)&r->connection->remote_addr)->sin_addr);
40+ #else
41+ client_ip = get_client_ip(client_ip_pool,
42+ r->connection->remote_addr)->sin_addr;
43+ #endif
b3de9be1 44 #endif
45 #ifdef THROTTLE_REMOTE_USER
46 remote_user = get_remote_user(remote_user_pool, r->connection->user);
This page took 0.095967 seconds and 4 git commands to generate.