Re: [PATCH nft] mnl: bogus error when running monitor mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 05, 2019 at 07:34:51PM +0200, Pablo Neira Ayuso wrote:
> 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@xxxxxxxxxxxxx>
> ---
>  src/mnl.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/src/mnl.c b/src/mnl.c
> index c0df2c941d88..a7693ef1de30 100644
> --- a/src/mnl.c
> +++ b/src/mnl.c
> @@ -1433,8 +1433,6 @@ 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",
>  			  NFTABLES_NLEVENT_BUFSIZ, bufsiz);

This error message is not correct: If mnl_set_rcvbuffer() returned
non-zero, both setsockopt() calls failed. The removed message would be
more appropriate for that situation.

BTW: While being at it, maybe s/socket buffer/socket receive buffer/?

Cheers, Phil




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux