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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150514154010.0a3ea6ee@urahara>
Date:	Thu, 14 May 2015 15:40:10 -0700
From:	Stephen Hemminger <stephen@...workplumber.org>
To:	Hangbin Liu <liuhangbin@...il.com>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH iproute2] ip route: should show the hoplimit value what
 kernel returns

On Wed, 13 May 2015 09:34:59 +0800
Hangbin Liu <liuhangbin@...il.com> wrote:

> 1. Kernel commit a02e4b7 set the default hoplimit as zero.
> 2. Kernel should return the correct values and iproute should show what kernel
> returns, not invent magic transformations.
> 
> Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
> ---
>  ip/iproute.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/ip/iproute.c b/ip/iproute.c
> index 670a4c6..569bff9 100644
> --- a/ip/iproute.c
> +++ b/ip/iproute.c
> @@ -579,9 +579,6 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
>  				print_rtax_features(fp, val);
>  				break;
>  			case RTAX_HOPLIMIT:
> -				if ((int)val == -1)
> -					val = 0;
> -				/* fall through */
>  			default:
>  				fprintf(fp, " %u", val);
>  				break;

This is going to cause a mess with older kernels. Since val will be -1
people will see that printed as unsigned and freak.
--
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