From 679cff2779c69f2bd8dfaedb1c1705dbc6b28a98 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 23 Aug 2009 20:45:05 -0700 Subject: [PATCH] Correct example in the docs and ensure that future idiots don't place 'default' in the PRIO column of tcclasses --- Shorewall/Perl/Shorewall/Tc.pm | 2 ++ docs/traffic_shaping.xml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Tc.pm b/Shorewall/Perl/Shorewall/Tc.pm index f822ad9d5..6ff8f3e13 100644 --- a/Shorewall/Perl/Shorewall/Tc.pm +++ b/Shorewall/Perl/Shorewall/Tc.pm @@ -678,6 +678,8 @@ sub validate_tc_class( ) { $rate = convert_rate ( $full, $rate, 'RATE' ); } + fatal_error "Invalid PRIO ($prio)" unless defined numeric_value $prio;; + $tcref->{$classnumber} = { tos => [] , rate => $rate , umax => $umax , diff --git a/docs/traffic_shaping.xml b/docs/traffic_shaping.xml index 0d4dc0520..b7cb5dc38 100644 --- a/docs/traffic_shaping.xml +++ b/docs/traffic_shaping.xml @@ -1493,7 +1493,7 @@ ppp0 4 90kbit 200kbit 3 default eth0 1 100kbit 500kbit 1 tcp-ack eth0 2 3mbit 6mbit 2 eth0 3 3mbit 6mbit 3 -eth0 4 94mbit full default #for local traffic +eth0 4 94mbit full 4 default #for local traffic /etc/shorewall/tcrules:#MARK SOURCE DEST PROTO PORT(S) CLIENT USER # PORT(S) @@ -2038,4 +2038,4 @@ class htb 1:120 parent 1:1 leaf 120: prio 2 quantum 1900 rate 76000bit ceil 2300 At least one Shorewall user has found this tool helpful: http://e2epi.internet2.edu/network-performance-toolkit.html - + \ No newline at end of file