[OpenSER-Devel] radiusclient-ng 0.5.6 REJECT_RC

Juha Heinanen jh at tutpro.com
Tue Oct 30 07:45:39 UTC 2007


radiusclient-ng version RELENG_0_5_6 has a new result code

#define REJECT_RC       2

which is returned if authentication failed due to wrong credentials.  it
could be used to avoid the currently misleading error message produced by
radius_[proxy|www]_authorize when where was no actual error, but
credentials simply did not match.

i would like to add the following ifdef to auth_radius/sterman.c:

	/* Send request */
	if ((i = rc_auth(rh, SIP_PORT, send, &received, msg)) == OK_RC) {
		LM_DBG("Success\n");
		rc_avpair_free(send);
		send = 0;
		generate_avps(received);
		rc_avpair_free(received);
		return 1;
	} else {
#ifdef REJECT_RC
		if (i == REJECT_RC) {		
			LM_DBG("Failure\n");
			goto err;
		}
#endif
		LM_ERR("authorization failed\n");	
	}

a couple of questions:

- is this something that can be done during testing phase of 1.3?

- what is the best place to define REJECT_RC?  should it go to
  Makefile.defs, auth_radius/Makefile or where?

-- juha



More information about the Devel mailing list