Giter Site home page Giter Site logo

Comments (4)

muirdm avatar muirdm commented on July 29, 2024

let request = sent_packets[response.identifier];

The response identifier is only one byte, so it can rollover or get repeats very quickly. Is it possible you are sending two different requests with the same identifier before you process the first request's response?

from node-radius.

pihomeserver avatar pihomeserver commented on July 29, 2024

I added as many as console.log instructions and i receive only one instruction from coova, sending only one to freeradius. Maybe the storage of the packet in sent_packets is incorrect ?

	client.bind(49001);
	// Prepare the CHAP-Password attribute
	let bufChapPass = Buffer.from(req.query.chap_pass, 'hex');
	if (bufChapPass.length < 17) {
		let zero = Buffer.alloc(17 - bufChapPass.length);
		bufChapPass = Buffer.concat([zero, bufChapPass], 17)
	}
	// Prepare attributes
	packet_freeradius.attributes = [
		['User-Name', req.query.user],
		['CHAP-Password', bufChapPass],
		['CHAP-Challenge', new Buffer.from(req.query.chap_chal, 'hex')],
	];
	// Send request to FreeRadius
	let encoded = radius.encode(packet_freeradius);
	sent_packets[packet_freeradius.identifier++] = {
		raw_packet: encoded,
		secret: packet_freeradius.secret
	};
	client.send(encoded, 0, encoded.length, 2812, "localhost");
	console.log('*-*-* Message sent');
	console.log('*-*-*');

from node-radius.

muirdm avatar muirdm commented on July 29, 2024

The most likely explanations are either the RADIUS server is sending the Access-Accept using the wrong shared secret, or it is calculating the authenticator incorrectly. Can you attach a tcpdump of the request and response (and provide the shared secret)?

from node-radius.

psanford avatar psanford commented on July 29, 2024

I'm going to close this due to lack of activity. Feel free to reopen if you are still having the issue and are able to provide more information.

from node-radius.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.