mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralgw.git
synced 2026-01-27 10:23:13 +00:00
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
This commit is contained in:
@@ -265,6 +265,7 @@ namespace OpenWifi {
|
||||
|
||||
P.PacketType(RADCMD_DISCON_REQ);
|
||||
P.Identifier(std::rand() & 0x00ff);
|
||||
P.Size_=0;
|
||||
P.AppendAttribute(RADIUS::AUTH_USERNAME, session->userName);
|
||||
P.AppendAttribute(RADIUS::NAS_IP, (std::uint32_t)(0x7f000001));
|
||||
P.AppendAttribute(RADIUS::CALLING_STATION_ID, session->callingStationId);
|
||||
|
||||
@@ -487,7 +487,10 @@ namespace OpenWifi::RADIUS {
|
||||
return *this;
|
||||
}
|
||||
|
||||
explicit RadiusPacket() = default;
|
||||
explicit RadiusPacket() {
|
||||
memset(&P_,0,sizeof(P_));
|
||||
Size_ = AttributeOffset;
|
||||
};
|
||||
|
||||
unsigned char *Buffer() { return (unsigned char *)&P_; }
|
||||
[[nodiscard]] uint16_t BufferLen() const { return sizeof(P_); }
|
||||
|
||||
@@ -860,7 +860,7 @@ radiusaps() {
|
||||
|
||||
radiuscoadm() {
|
||||
payload="$(printf '{ "accountingSessionId": "%s", "accountingMultiSessionId": "%s" , "callingStationId": "%s" }' "$2" "$3" "$4" )"
|
||||
curl ${FLAGS} -X PUT "https://${OWGW}/api/v1/radiusSessions/$1" \
|
||||
curl ${FLAGS} -X PUT "https://${OWGW}/api/v1/radiusSessions/$1?operation=coadm" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Accept: application/json" \
|
||||
-H "Authorization: Bearer ${token}" \
|
||||
|
||||
Reference in New Issue
Block a user