The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Functions to handle ldap referrals. More...
#include <freeradius-devel/ldap/base.h>
Go to the source code of this file.
Functions | |
static int | _fr_ldap_referral_free (fr_ldap_referral_t *referral) |
Clear up a fr_ldap_referral_t. More... | |
CC_NO_UBSAN (function) | |
Callback to send LDAP referral queries when a trunk becomes active. More... | |
fr_ldap_referral_t * | fr_ldap_referral_alloc (TALLOC_CTX *ctx, request_t *request) |
Allocate a new structure to handle an LDAP referral, setting the destructor. More... | |
int | fr_ldap_referral_follow (fr_ldap_thread_t *t, request_t *request, fr_ldap_query_t *query) |
Follow an LDAP referral. More... | |
int | fr_ldap_referral_next (fr_ldap_thread_t *t, request_t *request, fr_ldap_query_t *query) |
Follow an alternative LDAP referral. More... | |
Functions to handle ldap referrals.
Definition in file referral.c.
|
static |
Clear up a fr_ldap_referral_t.
If there is a parsed referral_url, that must be freed using libldap's ldap_free_urldesc
Definition at line 34 of file referral.c.
CC_NO_UBSAN | ( | function | ) |
Callback to send LDAP referral queries when a trunk becomes active.
Definition at line 67 of file referral.c.
fr_ldap_referral_t* fr_ldap_referral_alloc | ( | TALLOC_CTX * | ctx, |
request_t * | request | ||
) |
Allocate a new structure to handle an LDAP referral, setting the destructor.
[in] | ctx | to allocate the referral in |
[in] | request | the LDAP query relates to. |
Definition at line 49 of file referral.c.
int fr_ldap_referral_follow | ( | fr_ldap_thread_t * | t, |
request_t * | request, | ||
fr_ldap_query_t * | query | ||
) |
Follow an LDAP referral.
The returned list of LDAP referrals should already be in query->referrals. We check all the possible referrals and look for one where there already is an active trunk connection.
t | Thread running the query. |
request | related to the query. |
query | whose result was one or more referral URLs. |
Definition at line 113 of file referral.c.
int fr_ldap_referral_next | ( | fr_ldap_thread_t * | t, |
request_t * | request, | ||
fr_ldap_query_t * | query | ||
) |
Follow an alternative LDAP referral.
If an initial chase of an LDAP referral results in an error being returned this function can be used to attempt one of the other referral URLs given in the initial query results.
The initial use of fr_ldap_referral_follow may have launched trunks for any referral URLs which parsed successfully, so this starts by looking for the first which has an active state and sends the query that way.
If no active trunks match the remaining servers listed in referrals then new trunks are launched with watchers to send the query on the first active trunk.
t | Thread running the query. |
request | the query relates to. |
query | whose referrals are being chased. |
Definition at line 310 of file referral.c.