Add new comment

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Submitted by Austin Kauffman (not registered) on Fri, 2009-01-02 16:02.

In order to get High Availablity working with mod_auth_xradius a patch must be applied before compiling.

# vi src/patch-mod_auth_xradius.c (paste the following)
===============BEGIN CUT===============
--- src/mod_auth_xradius.c.orig Thu Apr 28 10:58:25 2005
+++ src/mod_auth_xradius.c Tue Dec 30 12:57:18 2008
@@ -125,15 +125,15 @@
  rctx = xrad_auth_open();

  /* Loop through the array of RADIUS Servers, adding them to the rctx object */
- sr = (xrad_server_info *) dc->servers->elts;
  for (i = 0; i < dc->servers->nelts; ++i) {
- rc = xrad_add_server(rctx, sr[i].hostname, sr[i].port, sr[i].secret,
+ sr = &(((xrad_server_info*)dc->servers->elts)[i]);
+ rc = xrad_add_server(rctx, sr->hostname, sr->port, sr->secret,
  dc->timeout, dc->maxtries);

  if (rc != 0) {
  ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
  "xradius: Failed to add server '%s:%d': (%d) %s",
- sr[i].hostname, sr[i].port, rc, xrad_strerror(rctx));
+ sr->hostname, sr->port, rc, xrad_strerror(rctx));
  goto run_cleanup;
  }
  }
@@ -294,7 +294,7 @@
  /* To properly use the Pools, this array is allocated from the here, instead of
  inside the directory configuration creation function. */
  if (dc->servers == NULL) {
- dc->servers = apr_array_make(parms->pool, 4, sizeof(xrad_server_info*));
+ dc->servers = apr_array_make(parms->pool, 4, sizeof(xrad_server_info));
  }

  sr = apr_array_push(dc->servers);
===============END CUT===============  
# patch < src/patch-mod_auth_xradius.c

This will allow you to add multiple radius servers with the AuthXRadiusAddServer directive.

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.

Reply

*
*
The content of this field is kept private and will not be shown publicly.


*

  • Images can be added to this post.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <div>
  • Lines and paragraphs break automatically.