From b3de9be157e40b7c03bfd2be88c857e26c1ef75a Mon Sep 17 00:00:00 2001 From: radek Date: Thu, 29 Aug 2002 20:44:14 +0000 Subject: [PATCH] - allow building with ipv6 patch Changed files: apache-mod_throttle-PLD-v6stuff.patch -> 1.1 apache1-mod_throttle-PLD-v6stuff.patch -> 1.1 --- apache-mod_throttle-PLD-v6stuff.patch | 30 ++++++++++++++++++++++++++ apache1-mod_throttle-PLD-v6stuff.patch | 30 ++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 apache-mod_throttle-PLD-v6stuff.patch create mode 100644 apache1-mod_throttle-PLD-v6stuff.patch diff --git a/apache-mod_throttle-PLD-v6stuff.patch b/apache-mod_throttle-PLD-v6stuff.patch new file mode 100644 index 0000000..ad6358c --- /dev/null +++ b/apache-mod_throttle-PLD-v6stuff.patch @@ -0,0 +1,30 @@ +diff -u mod_throttle-3.1.2/mod_throttle.c mod_throttle-3.1.2.new/mod_throttle.c +--- mod_throttle-3.1.2/mod_throttle.c Sun Dec 3 11:15:10 2000 ++++ mod_throttle-3.1.2.new/mod_throttle.c Thu Aug 29 21:04:31 2002 +@@ -41,6 +41,8 @@ + * for a FreeBSD machine for testing and several suggestions. + */ + ++/* This patch won't go with IPv6. Forget it. Or, better, fix it. */ ++ + /*********************************************************************** + *** Pick one that best suits your system. + ***********************************************************************/ +@@ -2811,7 +2813,7 @@ + * which we will apply the global policy for client connections. + */ + client_ip_config.track = (t_throttle *) get_client_ip( +- client_ip_pool, r->connection->remote_addr.sin_addr ++ client_ip_pool, ((struct sockaddr_in *)&r->connection->remote_addr)->sin_addr + ); + + /* Is it time for the period adjustment? */ +@@ -3185,7 +3187,7 @@ + (void) critical_acquire(critical); + + #ifdef THROTTLE_CLIENT_IP +- client_ip = get_client_ip(client_ip_pool, r->connection->remote_addr.sin_addr); ++ client_ip = get_client_ip(client_ip_pool, ((struct sockaddr_in *)&r->connection->remote_addr)->sin_addr); + #endif + #ifdef THROTTLE_REMOTE_USER + remote_user = get_remote_user(remote_user_pool, r->connection->user); diff --git a/apache1-mod_throttle-PLD-v6stuff.patch b/apache1-mod_throttle-PLD-v6stuff.patch new file mode 100644 index 0000000..ad6358c --- /dev/null +++ b/apache1-mod_throttle-PLD-v6stuff.patch @@ -0,0 +1,30 @@ +diff -u mod_throttle-3.1.2/mod_throttle.c mod_throttle-3.1.2.new/mod_throttle.c +--- mod_throttle-3.1.2/mod_throttle.c Sun Dec 3 11:15:10 2000 ++++ mod_throttle-3.1.2.new/mod_throttle.c Thu Aug 29 21:04:31 2002 +@@ -41,6 +41,8 @@ + * for a FreeBSD machine for testing and several suggestions. + */ + ++/* This patch won't go with IPv6. Forget it. Or, better, fix it. */ ++ + /*********************************************************************** + *** Pick one that best suits your system. + ***********************************************************************/ +@@ -2811,7 +2813,7 @@ + * which we will apply the global policy for client connections. + */ + client_ip_config.track = (t_throttle *) get_client_ip( +- client_ip_pool, r->connection->remote_addr.sin_addr ++ client_ip_pool, ((struct sockaddr_in *)&r->connection->remote_addr)->sin_addr + ); + + /* Is it time for the period adjustment? */ +@@ -3185,7 +3187,7 @@ + (void) critical_acquire(critical); + + #ifdef THROTTLE_CLIENT_IP +- client_ip = get_client_ip(client_ip_pool, r->connection->remote_addr.sin_addr); ++ client_ip = get_client_ip(client_ip_pool, ((struct sockaddr_in *)&r->connection->remote_addr)->sin_addr); + #endif + #ifdef THROTTLE_REMOTE_USER + remote_user = get_remote_user(remote_user_pool, r->connection->user); -- 2.44.0