summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2009-08-05 02:27:08 +0000
committerivan <ivan>2009-08-05 02:27:08 +0000
commitf062fac0e5f6c352c1622ed66531f0521980302c (patch)
tree19a8c6edb74679e0aabe3b067a11cdcbe48607b3
parent7bb7306b32e48ae29fc91eb969ba70a465d21c2d (diff)
export negative byte values to chillispot attributes as 0, RT#5815
-rw-r--r--FS/FS/svc_acct.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm
index 294e32794..ac978640d 100644
--- a/FS/FS/svc_acct.pm
+++ b/FS/FS/svc_acct.pm
@@ -1455,6 +1455,7 @@ sub radius_reply {
my $is = $whatis{$what}.'bytes';
if ( $self->$is() =~ /\d/ ) {
my $big = new Math::BigInt $self->$is();
+ $big = new Math::BigInto '0' if $big->is_neg();
my $att = "Chillispot-Max-\u$what";
$reply{"$att-Octets"} = $big->copy->band(0xffffffff)->bstr;
$reply{"$att-Gigawords"} = $big->copy->brsft(32)->bstr;