From 39f2f25500277a29b7847aa92a0738ec79abc30e Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Mon, 4 Apr 2005 21:47:10 +0000 Subject: [PATCH 1/1] ipt_ACCOUNT: (tomj) fix for the last fix (double added offsets) --- linux/net/ipv4/netfilter/ipt_ACCOUNT.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/linux/net/ipv4/netfilter/ipt_ACCOUNT.c b/linux/net/ipv4/netfilter/ipt_ACCOUNT.c index 79cfe3d..bcdfbc6 100644 --- a/linux/net/ipv4/netfilter/ipt_ACCOUNT.c +++ b/linux/net/ipv4/netfilter/ipt_ACCOUNT.c @@ -735,7 +735,7 @@ static int ipt_acc_handle_copy_data(void *to_user, u_int32_t *to_user_pos, */ static int ipt_acc_handle_get_data(u_int32_t handle, void *to_user) { - u_int32_t to_user_pos = 0, tmpbuf_pos=0, net_ip; + u_int32_t to_user_pos=0, tmpbuf_pos=0, net_ip; unsigned char depth; if (handle >= ACCOUNT_MAX_HANDLES) { @@ -777,7 +777,7 @@ static int ipt_acc_handle_get_data(u_int32_t handle, void *to_user) if (network_16->mask_24[b]) { struct ipt_acc_mask_24 *network = (struct ipt_acc_mask_24*)network_16->mask_24[b]; - if (ipt_acc_handle_copy_data(to_user+to_user_pos, &to_user_pos, + if (ipt_acc_handle_copy_data(to_user, &to_user_pos, &tmpbuf_pos, network, net_ip, (b << 16))) return -1; } @@ -804,7 +804,7 @@ static int ipt_acc_handle_get_data(u_int32_t handle, void *to_user) if (network_16->mask_24[b]) { struct ipt_acc_mask_24 *network = (struct ipt_acc_mask_24*)network_16->mask_24[b]; - if (ipt_acc_handle_copy_data(to_user+to_user_pos, + if (ipt_acc_handle_copy_data(to_user, &to_user_pos, &tmpbuf_pos, network, net_ip, (a << 8) | (b << 16))) return -1; -- 1.7.1