diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-01-14 14:29:48 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-01-14 14:29:48 +0100 |
commit | 6ceaa21f2a40cce6a9c45e99a9164618250fe6a3 (patch) | |
tree | b80543164ef3ab469cf59757144a114bcacc5066 /src/netlink.c | |
parent | 7a817e883baad98069d31bc846383f18bbfca33e (diff) | |
download | conntrack-tools-6ceaa21f2a40cce6a9c45e99a9164618250fe6a3.tar.gz conntrack-tools-6ceaa21f2a40cce6a9c45e99a9164618250fe6a3.zip |
netlink: don't double the netlink buffer twice during resize
The Linux kernel doubles the the size of the buffer by default.
See sock_setsockopt() in net/core/sock.c. We don't need to multiply
the current size by two.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/netlink.c')
-rw-r--r-- | src/netlink.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/netlink.c b/src/netlink.c index e164dd7..92fbf00 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -118,7 +118,8 @@ static int warned = 0; void nl_resize_socket_buffer(struct nfct_handle *h) { - unsigned int s = CONFIG(netlink_buffer_size) * 2; + /* sock_setsockopt in net/core/sock.c doubles the size of the buffer */ + unsigned int s = CONFIG(netlink_buffer_size); /* already warned that we have reached the maximum buffer size */ if (warned) |