From d0d70b03bb35824adc977560d615c5d944025341 Mon Sep 17 00:00:00 2001 From: Ermal Date: Mon, 10 Jan 2011 16:56:56 +0000 Subject: Ticket #1013. Force NAS_PORT to be of type integer to avoid it being interpreted as char and generate wrong radius packet. --- usr/local/captiveportal/radius_accounting.inc | 4 ++-- usr/local/captiveportal/radius_authentication.inc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'usr') diff --git a/usr/local/captiveportal/radius_accounting.inc b/usr/local/captiveportal/radius_accounting.inc index 958fabf..67bb523 100644 --- a/usr/local/captiveportal/radius_accounting.inc +++ b/usr/local/captiveportal/radius_accounting.inc @@ -126,7 +126,7 @@ function RADIUS_ACCOUNTING_START($ruleno, $username, $sessionid, $radiusservers, // Default attributes $racct->putAttribute(RADIUS_SERVICE_TYPE, RADIUS_LOGIN); $racct->putAttribute(RADIUS_NAS_PORT_TYPE, RADIUS_ETHERNET); - $racct->putAttribute(RADIUS_NAS_PORT, $nas_port); + $racct->putAttribute(RADIUS_NAS_PORT, $nas_port, 'integer'); $racct->putAttribute(RADIUS_ACCT_SESSION_ID, $sessionid); // Extra data to identify the client and nas @@ -319,4 +319,4 @@ function remainder($bytes) { } -?> \ No newline at end of file +?> diff --git a/usr/local/captiveportal/radius_authentication.inc b/usr/local/captiveportal/radius_authentication.inc index 1349e8e..142ab0e 100644 --- a/usr/local/captiveportal/radius_authentication.inc +++ b/usr/local/captiveportal/radius_authentication.inc @@ -103,7 +103,7 @@ function RADIUS_AUTHENTICATION($username,$password,$radiusservers,$clientip,$cli // Default attributes $rauth->putAttribute(RADIUS_SERVICE_TYPE, RADIUS_LOGIN); $rauth->putAttribute(RADIUS_NAS_PORT_TYPE, RADIUS_ETHERNET); - $rauth->putAttribute(RADIUS_NAS_PORT, $nas_port); + $rauth->putAttribute(RADIUS_NAS_PORT, $nas_port, 'integer'); // Extra data to identify the client and nas $rauth->putAttribute(RADIUS_FRAMED_IP_ADDRESS, $clientip, addr); @@ -152,4 +152,4 @@ function RADIUS_AUTHENTICATION($username,$password,$radiusservers,$clientip,$cli } -?> \ No newline at end of file +?> -- cgit v1.1