Add TOS column to tcrules

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3837 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2006-05-02 17:34:37 +00:00
parent 25bf96ecb5
commit ec6a17c4c7
4 changed files with 25 additions and 5 deletions

View File

@ -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.

View File

@ -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
#

View File

@ -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:

View File

@ -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