[pve-devel] [PATCH 3/6] setup_tc_rate_limit : delete class and filter before update
Dietmar Maurer
dietmar at proxmox.com
Tue Mar 5 13:00:27 CET 2013
> >>This expression makes no sense to me? Maybe we just need
> >>
> >>return if !$rate;
>
> pve-manager can send rate=0 to api2, is it filtered somewhere ?
> (just to be sure, in perl, is 0 != undef ? )
You need to add extra test for undefined values:
defined($rate)
the boolean !$rate is true for 0 and undef.
> ----- Mail original -----
>
> De: "Dietmar Maurer" <dietmar at proxmox.com>
> À: "Alexandre Derumier" <aderumier at odiso.com>, pve-
> devel at pve.proxmox.com
> Envoyé: Mardi 5 Mars 2013 11:52:23
> Objet: RE: [pve-devel] [PATCH 3/6] setup_tc_rate_limit : delete class and filter
> before update
>
> > system("/sbin/tc qdisc del dev $iface root >/dev/null 2>&1");
> >
> > + return if (!$rate || ($rate && $rate == 0));
>
> This expression makes no sense to me? Maybe we just need
>
> return if !$rate;
More information about the pve-devel
mailing list