From f2f7edf404817bd838527feef1ab870c3898fe19 Mon Sep 17 00:00:00 2001 From: teastep Date: Wed, 3 May 2006 20:37:35 +0000 Subject: [PATCH] Allow hex numbers in 'mark' column of the providers file git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3850 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/compiler | 8 ++++++++ Shorewall/shorewall.conf | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Shorewall/compiler b/Shorewall/compiler index e0c137abc..e069634f5 100755 --- a/Shorewall/compiler +++ b/Shorewall/compiler @@ -1182,6 +1182,14 @@ __EOF__ local t n iface option first=Yes [ -n "$MANGLE_ENABLED" ] || fatal_error "Providers require mangle support in your kernel and iptables" + # + # The following is because the %$#@ shell doesn't except hex numbers in '-eq' tests + # + case number in + 0*) + number=$(($number + 0)) + ;; + esac for t in $PROVIDERS; do if [ "$t" = "$table" ]; then diff --git a/Shorewall/shorewall.conf b/Shorewall/shorewall.conf index c40da646b..b7130f5f5 100644 --- a/Shorewall/shorewall.conf +++ b/Shorewall/shorewall.conf @@ -860,7 +860,7 @@ IMPLICIT_CONTINUE=Yes # # Normally, Shorewall restricts the set of mark values to 1-255. If you set # HIGH_ROUTE_MARKS=Yes, Shorewall will rather restrict the set of routing -# mark values (those specified in the /etc/shorewall/providers file) to +# mark values (those specified in the /etc/shorewall/providers file) from # 0x0100 to 0XFF00 (with the low-order byte being zero). This allows # connection marks to be shared between traffic shaping and policy routing # (traffic shaping marks are always restricted to 1-255).