From 98d7bbe9214488d595031257b35bc5abb5a24f43 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Mon, 31 Oct 2016 18:21:35 +0100 Subject: [PATCH] Look at servers->dynamiclookuparg for deciding if a server is dynamic. 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. --- develdoc.txt | 4 ++-- radsecproxy.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/develdoc.txt b/develdoc.txt index fb43cd0..d61dab6 100644 --- a/develdoc.txt +++ b/develdoc.txt @@ -337,8 +337,8 @@ traverses the list of realms and for each realm: - same thing for realm->accsrvconfs as for srvconfs - - if none of the realm->srvconfs nor the realm->accsrvonfs has a - dynamiclookupcommand: + - if none of realm->srvconfs->servers and realm->accsrvonfs->servers + have dynamiclookuparg set: - for each srv in realm->srvconfs: free srv and decrease ref on realm diff --git a/radsecproxy.c b/radsecproxy.c index 7efebed..2f21fcb 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -706,7 +706,7 @@ int hasdynamicserver(struct list *srvconfs) { struct list_node *entry; for (entry = list_first(srvconfs); entry; entry = list_next(entry)) - if (((struct clsrvconf *)entry->data)->dynamiclookupcommand) + if (((struct clsrvconf *)entry->data)->servers->dynamiclookuparg) return 1; return 0; }