From 21a6f905544e4e16f71e001cecbd38fe9d848e12 Mon Sep 17 00:00:00 2001 From: teastep Date: Thu, 6 Oct 2005 00:07:06 +0000 Subject: [PATCH] Use CLASSIFY target when it is available git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@2809 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/firewall | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Shorewall/firewall b/Shorewall/firewall index 3b6e32452..6183c33af 100755 --- a/Shorewall/firewall +++ b/Shorewall/firewall @@ -3292,8 +3292,11 @@ setup_traffic_shaping() ensure_and_save_command tc class add dev $device parent 1:1 classid 1:1$mark htb rate $rate ceil $ceil prio $prio quantum $(calculate_quantum $rate) ensure_and_save_command tc qdisc add dev $device parent 1:1$mark handle 1$mark: sfq perturb 10 # add filters - ensure_and_save_command tc filter add dev $device protocol ip parent 1:0 prio 1 handle $mark fw classid 1:1$mark - # options + if [ -n "$CLASSIFY_TARGET" ]; then + run_iptables -t mangle -A tcpost -o $device -m mark --mark $mark -j CLASSIFY --set-class 1:1$mark + else + ensure_and_save_command tc filter add dev $device protocol ip parent 1:0 prio 1 handle $mark fw classid 1:1$mark + fi list_search "tcp-ack" $options && ensure_and_save_command tc filter add dev $device parent 1:0 protocol ip prio 10 u32 match ip protocol 6 0xff match u8 0x05 0x0f at 0 match u16 0x0000 0xffc0 at 2 match u8 0x10 0xff at 33 flowid 1:1$mark list_search "tos-minimize-delay" $options && ensure_and_save_command tc filter add dev $device parent 1:0 protocol ip prio 10 u32 match ip tos 0x10 0xff flowid 1:1$mark list_search "tos-minimize-cost" $options && ensure_and_save_command tc filter add dev $device parent 1:0 protocol ip prio 10 u32 match ip tos 0x02 0xff flowid 1:1$mark