lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150506172502.GA2560@angus-think.lan>
Date:	Wed, 6 May 2015 20:25:02 +0300
From:	Vadim Kochan <vadim4j@...il.com>
To:	Stephen Hemminger <stephen@...workplumber.org>
Cc:	netdev@...r.kernel.org, Stephen Hemminger <shemming@...cade.com>
Subject: Re: [PATCH 2/4] ip: return correct exit code on route failure

On Wed, May 06, 2015 at 09:58:01AM -0700, Stephen Hemminger wrote:
> From: Stephen Hemminger <shemming@...cade.com>
> 
> If kernel complains about ip route request, exit status should be
> 2 not 1.
> 
> This fixes regression introduced by:
> commit 42ecedd4bae534fc688194a795eb4548c6530cda
> Author: Roopa Prabhu <roopa@...ulusnetworks.com>
> Date:   Tue Mar 17 19:26:32 2015 -0700
> 
>     fix ip -force -batch to continue on errors
> ---
>  ip/iproute.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ip/iproute.c b/ip/iproute.c
> index e0a6159..06aea6f 100644
> --- a/ip/iproute.c
> +++ b/ip/iproute.c
> @@ -1164,7 +1164,7 @@ static int iproute_modify(int cmd, unsigned flags, int argc, char **argv)
>  		req.r.rtm_family = AF_INET;
>  
>  	if (rtnl_talk(&rth, &req.n, 0, 0, NULL) < 0)
> -		return -1;
> +		return -2;
May be it would be good to have a #define's like ERR_APP & ERR_KERN ?

>  
>  	return 0;
>  }
> -- 
> 2.1.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ