diff --git a/Shorewall/changelog.txt b/Shorewall/changelog.txt index acc53222f..e7bb3f919 100644 --- a/Shorewall/changelog.txt +++ b/Shorewall/changelog.txt @@ -4,6 +4,8 @@ Changes in 3.2.0 Beta 6 2) Allow 'detectnets' to work. +3) Add TOS column to tcrules. + Changes in 3.2.0 Beta 5 1) Fix compilation problem on LEAF Bering. diff --git a/Shorewall/compiler b/Shorewall/compiler index 17a2983a0..7b7034e35 100755 --- a/Shorewall/compiler +++ b/Shorewall/compiler @@ -3274,6 +3274,10 @@ process_tc_rule() r="${r}-m length --length ${length} " fi + if [ "x${tos:=-}" != "x-" ]; then + r="${r}-m tos --tos ${tos} " + fi + multiport= case $proto in @@ -3482,9 +3486,9 @@ setup_tc1() { # strip_file tcrules - while read mark sources dests proto ports sports user testval length; do - expandv mark sources dests proto ports sports user testval length - rule=$(echo "$mark $sources $dests $proto $ports $sports $user $testval $length") + while read mark sources dests proto ports sports user testval length tos; do + expandv mark sources dests proto ports sports user testval length tos + rule=$(echo "$mark $sources $dests $proto $ports $sports $user $testval $length $tos") process_tc_rule done < $TMP_DIR/tcrules # diff --git a/Shorewall/releasenotes.txt b/Shorewall/releasenotes.txt index ab39471fa..4ea951347 100644 --- a/Shorewall/releasenotes.txt +++ b/Shorewall/releasenotes.txt @@ -42,7 +42,8 @@ Problems Corrected in 3.2.0 Beta 6 Other changes in 3.2.0 Beta 6 -None. +1) A TOS column has been added to /etc/shorewall/tcrules. This allows marking + based on the contents of the TOS field in the packet header. Migration Considerations: diff --git a/Shorewall/tcrules b/Shorewall/tcrules index 4934c9424..444b64ff7 100644 --- a/Shorewall/tcrules +++ b/Shorewall/tcrules @@ -195,6 +195,19 @@ # Examples: 1024, 64:1500, :100 (packet of length # 100 bytes or less) # +# If you don't want to define a test but need to specify +# anything in the following columns, place a "-" in this +# field. +# +# TOS Type of service. Either a standard name, or a numeric +# value to match. +# +# Minimize-Delay (16) +# Maximize-Throughput (8) +# Maximize-Reliability (4) +# Minimize-Cost (2) +# Normal-Service (0) +# # Example 1: # # Mark all ICMP echo traffic with packet mark 1. @@ -226,6 +239,6 @@ # For usage in selecting among multiple ISPs, see # http://shorewall.net/MultiISP.html ############################################################################### -#MARK SOURCE DEST PROTO PORT(S) CLIENT USER TEST LENGTH +#MARK SOURCE DEST PROTO PORT(S) CLIENT USER TEST LENGTH TOS # PORT(S) #LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE