Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve a failover RADIUS server hostname if need #222

Merged
merged 1 commit into from
Sep 12, 2022

Conversation

0xAX
Copy link
Member

@0xAX 0xAX commented Sep 2, 2022

RADIUS client API allows to pass list of failover servers. Active
failover servers are stored within internal ets table as list of
IPs/ports. So if a request will fail for a primary RADIUS server -
eradius will try to find active failover server based on passed
list and data from the ets table.

The issue is that failover servers could be passed to the RADIUS
client as list of Hosts/Ports instead of IPs/Ports. This commit
adds resolving of given failover servers hostnames so if list
of failover RADIUS servers contains hostnames eradius client still
could find an active server.

@0xAX 0xAX requested a review from a team as a code owner September 2, 2022 11:37
RADIUS client API allows to pass list of failover servers. Active
failover servers are stored within internal ets table as list of
IPs/ports. So if a request will fail for a primary RADIUS server -
eradius will try to find active failover server based on passed
list and data from the ets table.

The issue is that failover servers could be passed to the RADIUS
client as list of Hosts/Ports instead of IPs/Ports. This commit
adds resolving of given failover servers hostnames so if list
of failover RADIUS servers contains hostnames eradius client still
could find an active server.
@0xAX 0xAX force-pushed the resolve-failover-server-hostname branch from 10371da to 28546de Compare September 2, 2022 11:49
IP = get_ip(Host),
find_suitable_peer([{IP, Port, Secret} | Pool])
catch _:_ ->
% can't resolve ip by some reasons, just ignore it
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe make sense to add log here for this case

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any sense in it

@0xAX 0xAX merged commit 807295c into master Sep 12, 2022
@0xAX 0xAX deleted the resolve-failover-server-hostname branch September 12, 2022 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants