diff options
author | Christian Poessinger <christian@poessinger.com> | 2017-12-26 22:37:46 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2017-12-26 22:38:14 +0100 |
commit | 5281af1e78a377dfbd038545730c082c0a0a9b3c (patch) | |
tree | daa3bbea8f9da0c5b06302835dca85c05dc4168d | |
parent | 70be83841463e77fca50138490ebe62f75d67640 (diff) | |
download | vyatta-cfg-qos-5281af1e78a377dfbd038545730c082c0a0a9b3c.tar.gz vyatta-cfg-qos-5281af1e78a377dfbd038545730c082c0a0a9b3c.zip |
T453: QOS Match.pm shaper max-length
Convert string to int before bitwise and operation
Signed-off-by: Carl Byington <carl@five-ten-sg.com>
-rw-r--r-- | lib/Vyatta/Qos/Match.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Vyatta/Qos/Match.pm b/lib/Vyatta/Qos/Match.pm index c8078b6..f08c317 100644 --- a/lib/Vyatta/Qos/Match.pm +++ b/lib/Vyatta/Qos/Match.pm @@ -184,9 +184,9 @@ sub filter { # IPv6 : match u16 0x0000 ~MAXLEN at 4 if ($$p{maxlen}) { if ( $proto eq 'ip' ) { - printf " match u16 0x0000 %#.4x at 2", (hex('0xFFFF') & ~($$p{maxlen})); + printf " match u16 0x0000 %#.4x at 2", 0xffff & ~int($$p{maxlen}); } elsif ( $proto eq 'ipv6' ) { - printf " match u16 0x0000 %#.4x at 4", (hex('0xFFFF') & ~($$p{maxlen})); + printf " match u16 0x0000 %#.4x at 4", 0xffff & ~int($$p{maxlen}); } } # TCP Flags : |