diff --git a/nfq2/nfqws.c b/nfq2/nfqws.c index 1c9d605..e5c0d11 100644 --- a/nfq2/nfqws.c +++ b/nfq2/nfqws.c @@ -365,6 +365,8 @@ static bool nfq_init(struct nfq_handle **h, struct nfq_q_handle **qh, uint8_t *m // dot not fail. not supported in old linuxes <3.6 } + nfnl_rcvbufsiz(nfq_nfnlh(*h), Q_RCVBUF); + int yes = 1, fd = nfq_fd(*h); #if defined SOL_NETLINK && defined NETLINK_NO_ENOBUFS diff --git a/nfq2/params.h b/nfq2/params.h index 8b449ff..a04772f 100644 --- a/nfq2/params.h +++ b/nfq2/params.h @@ -23,7 +23,8 @@ #define RAW_SNDBUF (64*1024) // in bytes -#define Q_MAXLEN 1024 // in packets +#define Q_MAXLEN 4096 // in packets +#define Q_RCVBUF (1024*1024) // in bytes #define HOSTLIST_AUTO_FAIL_THRESHOLD_DEFAULT 3 #define HOSTLIST_AUTO_FAIL_TIME_DEFAULT 60