]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
mnl: bogus error when running monitor mode
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 5 Jun 2019 17:34:51 +0000 (19:34 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 7 Jun 2019 12:11:28 +0000 (14:11 +0200)
Fix bogus error message:

 # nft monitor
 Cannot set up netlink socket buffer size to 16777216 bytes, falling back to 16777216 bytes

Fixes: bcf60fb819bf ("mnl: add mnl_set_rcvbuffer() and use it")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/mnl.c

index 5c76f7f6a4914546862d69ce21c6e3fa1b09baf8..83dfb9d2da20a3a3c91b688d50b43b62c20f28a4 100644 (file)
--- a/src/mnl.c
+++ b/src/mnl.c
@@ -1438,9 +1438,7 @@ int mnl_nft_event_listener(struct mnl_socket *nf_sock, unsigned int debug_mask,
 
        ret = mnl_set_rcvbuffer(nf_sock, bufsiz);
        if (ret < 0)
-               nft_print(octx, "# Cannot increase netlink socket buffer size, expect message loss\n");
-       else
-               nft_print(octx, "# Cannot set up netlink socket buffer size to %u bytes, falling back to %u bytes\n",
+               nft_print(octx, "# Cannot set up netlink receive socket buffer size to %u bytes, falling back to %u bytes\n",
                          NFTABLES_NLEVENT_BUFSIZ, bufsiz);
 
        while (1) {