From: Thomas Jarosch Date: Mon, 4 Apr 2005 09:05:59 +0000 (+0000) Subject: ipt_ACCOUNT: (tomj) fix for large networks X-Git-Tag: v1.9~20 X-Git-Url: http://developer.intra2net.com/git/?p=ipt_ACCOUNT;a=commitdiff_plain;h=7a52ea77aab18a797b206e0547dc8b0067c06387;hp=ac83062b3338533e35d5fab7f8132d1646bcb9c0 ipt_ACCOUNT: (tomj) fix for large networks --- diff --git a/linux/net/ipv4/netfilter/ipt_ACCOUNT.c b/linux/net/ipv4/netfilter/ipt_ACCOUNT.c index 71e5133..61855b2 100644 --- a/linux/net/ipv4/netfilter/ipt_ACCOUNT.c +++ b/linux/net/ipv4/netfilter/ipt_ACCOUNT.c @@ -714,9 +714,9 @@ int ipt_acc_handle_copy_data(void *to_user, int *pos, /* Temporary buffer full? Flush to userspace */ if (*pos+handle_ip_size >= PAGE_SIZE) { - *pos = 0; if (copy_to_user(to_user, ipt_acc_tmpbuf, *pos)) return -EFAULT; + *pos = 0; } memcpy(ipt_acc_tmpbuf+*pos, &handle_ip, handle_ip_size); *pos += handle_ip_size;