Ja używam.
Filter-Id
authorize_reply_query = "SELECT id, lower(name) as UserName ,
'Framed-IP-Address' as Attribute, inet_ntoa(ipaddr) as Value, '=='
as op \
FROM nodes \
WHERE name = '%{User-Name}' \
UNION \
SELECT 0 AS id, '%{User-Name}' AS UserName, 'Filter-Id' AS
Attribute, \
CONCAT(ROUND(COALESCE(x.downceil, y.downceil,
z.downceil)),'/', ROUND(COALESCE(x.upceil, y.upceil, z.upceil)))
AS Value, ':=' AS op \
FROM (SELECT n.id, MIN(n.name) AS name,
SUM(t.downceil/o.cnt) AS downceil, SUM(t.upceil/o.cnt) AS upceil \
FROM nodeassignments na JOIN assignments a ON
(na.assignmentid = a.id) JOIN tariffs t ON (a.tariffid = t.id) \
JOIN nodes n ON (na.nodeid = n.id) JOIN (SELECT
assignmentid, COUNT(*) AS cnt FROM nodeassignments GROUP BY
assignmentid \
) o ON (o.assignmentid = na.assignmentid) WHERE
(a.datefrom <= unix_timestamp() OR a.datefrom = 0) \
AND (a.dateto > unix_timestamp() OR a.dateto = 0) AND
a.suspended = 0 AND n.name = '%{User-Name}' \
GROUP BY n.id \
) x \
LEFT JOIN ( \
SELECT SUM(t.downceil)/o.cnt AS downceil, \
SUM(t.upceil)/o.cnt AS upceil \
FROM assignments a \
JOIN tariffs t ON (a.tariffid = t.id) \
JOIN nodes n ON (a.customerid = n.ownerid) \
JOIN (SELECT COUNT(*) AS cnt, ownerid FROM nodes \
WHERE NOT EXISTS (SELECT 1 FROM nodeassignments,
assignments a \
WHERE assignmentid = a.id AND nodeid = nodes.id \
AND a.suspended = 0 AND (a.dateto >
unix_timestamp() OR a.dateto = 0)) \
GROUP BY ownerid \
) o ON (o.ownerid = n.ownerid) \
WHERE (a.datefrom <= unix_timestamp() OR a.datefrom =
0) \
AND (a.dateto > unix_timestamp() OR a.dateto = 0) AND
a.suspended = 0 \
AND NOT EXISTS (SELECT 1 FROM nodeassignments WHERE
assignmentid = a.id) \
AND n.name = '%{User-Name}' \
GROUP BY n.id \
) y ON (1=1) \
RIGHT JOIN (SELECT n.id, n.name, 256 AS downceil, 256 AS
upceil \
FROM nodes n WHERE n.name = '%{User-Name}' \
) z ON (1=1);"
}
Pozdrawiam,
SP
WitamCzy ktoś z lms'owiczów używa z lmsem radiusa w połączeniu z accel-pppd z shapeingiem?Chodzi mi jakie konkretnie wartości zwrócić z radiusa by wartości to shapeingu były dynamicznie ustawiane?Dla mikrotika zwracam Mikrotik-Rate-Limit a co zwrócić dla accel-pppd?
z góry dzięki
--
Pozdrawiam
Marcin / nicraM
_______________________________________________ lms mailing list lms@lists.lms.org.pl http://lists.lms.org.pl/mailman/listinfo/lms