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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 18 Jun 2013 10:48:05 -0700
From:	Stephen Hemminger <stephen@...workplumber.org>
To:	Philipp Schönberger 
	<ph.schoenberger@...glemail.com>
Cc:	netdev@...r.kernel.org
Subject: Re: [iproute2 PATCH] tc: handle is not used without containing ':'

On Thu, 13 Jun 2013 19:20:52 +0200
Philipp Schönberger  <ph.schoenberger@...glemail.com> wrote:

> Handle is not used if it is not containing a ':' . This is
> reproducible with these commands.
> 
> /sbin/tc qdisc add dev lo parent 0xffffffff handle 0x10000 pfifo limit 10
> 
> /sbin/tc qdisc show dev lo
> qdisc pfifo 8001: root refcnt 2 limit 10p
> 
> Signed-off-by: Philipp Schönberger <ph.schoenberger@...glemail.com>
> --- iproute2-2.6.33/tc/tc_util.c    2010-02-25 04:56:50.000000000 +0100
> +++ /home/pschoen/tc_util.c    2013-06-13 18:31:00.347135625 +0200
> @@ -50,9 +50,14 @@
>      maj = strtoul(str, &p, 16);
>      if (p == str)
>          return -1;
> -    maj <<= 16;
> -    if (*p != ':' && *p!=0)
> -        return -1;
> +    if (*p != ':')
> +    {
> +        if(*p!=0)
> +            return -1;
> +        else if (TC_H_MIN(maj) != 0)
> +            return -1;
> +    }else
> +        maj <<= 16;
>  ok:
>      *h = maj;
>      return 0;
> --
> 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

The syntax for tc has always reqired : after the handle.
 http://www.lartc.org/howto/lartc.qdisc.classful.html

One could argue the error checking could be better, but not worth changing
the syntax now.
--
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