Skip to content

Commit

Permalink
Look at servers->dynamiclookuparg for deciding if a server is dynamic.
Browse files Browse the repository at this point in the history
The dynamiclookupcommand member of the _config_ of the server is being
set to NULL when it's copied in confserver_cb(), resulting in dynamic
discovery being done for realms that already have a server.

Patch from Fabian Mauchle.

Addresses RADSECPROXY-69.
  • Loading branch information
Linus Nordberg committed Nov 1, 2016
1 parent 9d53e6e commit 47ccc9f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Unreleased 1.6.9
Bug fixes:
- Avoid creating another dynamic server when we already have one
working (RADSECPROXY-69). Patch by Fabian Mauchle.

2016-09-21 1.6.8
Bug fixes:
- Stop waiting on writable when reading a TCP socket.
Expand Down
6 changes: 5 additions & 1 deletion radsecproxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -777,10 +777,14 @@ int hasdynamicserver(struct list *srvconfs) {

for (entry = list_first(srvconfs); entry; entry = list_next(entry))
#if defined ENABLE_EXPERIMENTAL_DYNDISC
/* NOTE: This should probably be servers->dynamiclookuparg,
* like in !ENABLE_EXPERIMENTAL_DYNDISC, but we're not
* touching this code any more. It shouldn't be used and it's
* going away. */
if (((struct clsrvconf *)entry->data)->dynamiclookupcommand
|| ((struct clsrvconf *)entry->data)->servers->in_use)
#else
if (((struct clsrvconf *)entry->data)->dynamiclookupcommand)
if (((struct clsrvconf *)entry->data)->servers->dynamiclookuparg)
#endif
return 1;
return 0;
Expand Down

0 comments on commit 47ccc9f

Please sign in to comment.