retailnext / node-radius

Node.js RADIUS library for packet encoding and decoding.
Other
200 stars 60 forks source link

Disconnect-Request not work #67

Open rodrigoadachi opened 1 year ago

rodrigoadachi commented 1 year ago

A small snippet of code

I can't request the user to disconnect, it doesn't happen

` const encoded = radius.encode({ code: 'Disconnect-Request', secret: this.secret, identifier: 0, attributes: [ ['User-Name', connect.username], ['NAS-Identifier', 'MikroTik'], ] });

this.server.send(
  encoded,
  0,
  encoded.length,
  3799, '127.0.0.1', (err, bytes) => {

    if (err) {
      console.log('Error sending response to ');
      console.log(err);
    }
    console.log(bytes);
  });

`

skibz commented 11 months ago

At least two identifying attributes for a session are required in order for the NAS to act on a disconnect request or change of authorization request.