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: <20171107105754.45b0449d@shemminger-XPS-13-9360>
Date:   Tue, 7 Nov 2017 10:57:54 +0900
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Amritha Nambiar <amritha.nambiar@...el.com>
Cc:     netdev@...r.kernel.org, alexander.h.duyck@...el.com,
        jiri@...nulli.us, jhs@...atatu.com, alexander.duyck@...il.com,
        xiyou.wangcong@...il.com
Subject: Re: [iproute2 PATCH] flower: Represent HW traffic classes as
 classid values

On Fri, 03 Nov 2017 01:54:01 -0700
Amritha Nambiar <amritha.nambiar@...el.com> wrote:

> +			tc = strtoul(*argv, &end, 0);
> +			if (*end) {
> +				fprintf(stderr, "Illegal TC index\n");
> +				return -1;
> +			}

I will apply this, looks fine.

While looking at the flower parsing I noticed that the code
should have been using the function invarg() in utils rather
than calling fprintf(stderr,...).  This is for a couple of reasons
the first is that its good to print the offending argument as
well as the reason, and the other one is that if a bad argument
is given then exit should be called rather than returning -1.  If -1
is returned and batch mode is used, the batch continues. For the case
of bogus arguments it is better to die right away.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ