]> git.proxmox.com Git - pve-common.git/commitdiff
net: improve ingress tc filter
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 8 Mar 2016 14:36:24 +0000 (15:36 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 8 Mar 2016 14:58:57 +0000 (15:58 +0100)
Instead of doing a dummy "0 == 0" comparison with the u32
filter just use the 'basic' filter.

src/PVE/Network.pm

index 2d6781a4eb1c4aaa0bd4c9ce9b99260b36f2a252..ac2c168c0ef718b4ec3656d2b6d1259ea6579766 100644 (file)
@@ -92,7 +92,7 @@ sub setup_tc_rate_limit {
 
     run_command("/sbin/tc qdisc add dev $iface handle ffff: ingress");
     run_command("/sbin/tc filter add dev $iface parent ffff: " .
 
     run_command("/sbin/tc qdisc add dev $iface handle ffff: ingress");
     run_command("/sbin/tc filter add dev $iface parent ffff: " .
-               "protocol all prio 50 u32 match u32 0 0 " .
+               "prio 50 basic " .
                "police rate ${rate}bps burst ${burst}b mtu 64kb " .
                "drop flowid :1");
 
                "police rate ${rate}bps burst ${burst}b mtu 64kb " .
                "drop flowid :1");