forked from extern/shorewall_code
Allow hex numbers in 'mark' column of the providers file == Take 3
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3852 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
b4a3be9bc0
commit
0b2b7935fc
@ -1105,9 +1105,9 @@ verify_mark() # $1 = value to test
|
||||
{
|
||||
verify_mark1()
|
||||
{
|
||||
[ $1 -lt 256 ] && return 0
|
||||
[ $(($1)) -lt 256 ] && return 0
|
||||
[ -n "$HIGH_ROUTE_MARKS" ] || return 1
|
||||
[ $1 -gt 65535 ] && return 1
|
||||
[ $(($1)) -gt 65535 ] && return 1
|
||||
return $(($1 & 0XFF))
|
||||
}
|
||||
|
||||
@ -3065,8 +3065,12 @@ setup_traffic_shaping()
|
||||
fatal_error "device $device seems not to be configured in tcdevices"
|
||||
fi
|
||||
list_search "$device-$mark" $classlist && fatal_error "Mark $mark for interface $device defined more than once in tcclasses"
|
||||
#
|
||||
# Convert HEX/OCTAL mark representation to decimal
|
||||
#
|
||||
mark=$(($mark))
|
||||
verify_mark $mark
|
||||
[ $(($mark)) -lt 256 ] || fatal_error "Invalid Mark Value"
|
||||
[ $mark -lt 256 ] || fatal_error "Invalid Mark Value"
|
||||
classlist="$classlist $device-$mark"
|
||||
done < $TMP_DIR/tcclasses
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user