Skip to content

Commit

Permalink
replace _get_dns_servers with pf::util::dns::get_resolv_dns_servers
Browse files Browse the repository at this point in the history
Fixes #8471
  • Loading branch information
jrouzierinverse committed Jan 7, 2025
1 parent 90dfe27 commit 920739e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pf/UnifiedApi/Controller/Config/System.pm
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ sub put_dns_servers {
my $tmpfile = File::Temp->new()->filename;
write_file($tmpfile, $content);
pf_run("cat $tmpfile | sudo tee /etc/resolv.conf");
my $saved_servers = $self->_get_dns_servers();
my $saved_servers = pf::util::dns::get_resolv_dns_servers();

if(scalar(@$servers) != scalar(@$saved_servers)) {
$self->render(json => {message => "DNS servers haven't been saved properly"}, status => 500);
Expand Down

0 comments on commit 920739e

Please sign in to comment.