Re: [iptables PATCH v2 2/2] nfnl_osf: Improve error handling

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

 



Two minor nits during final review:

On Fri, May 15, 2020 at 04:03:30PM +0200, Phil Sutter wrote:
[...]
> ---
> Changes since v1:
> - Don't use ulog_err() when complaining about missing fingerprints
>   argument, the use of strerror() with zero errno is misleading.
> - Don't print error on osf_load_line() failure when deleting and errno
>   is ENOENT. Upon add, NLM_F_EXCL is not set so EEXIST is basically
>   ignored, be equally error-tolerant upon deletion.

This change didn't make it into the commit message, although it's worth
mentioning.

[...]
> @@ -414,9 +416,11 @@ static int osf_load_entries(char *path, int del)
>  
>  		buf[len] = '\0';
>  
> -		err = osf_load_line(buf, len, del);
> -		if (err)
> -			break;
> +		rc = osf_load_line(buf, len, del);
> +		if (rc && (!del || errno == ENOENT)) {

Stupid typo here, it should read 'errno != ENOENT'.

I'll fix both before pushing upstream.

Cheers, Phil



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

  Powered by Linux