Skip to content

Commit

Permalink
preload pfconfig before listening on TCP socket
Browse files Browse the repository at this point in the history
  • Loading branch information
julsemaan committed Dec 22, 2022
1 parent 04a7dfd commit 800fb29
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sbin/pfconfig
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ $pfconfig::constants::CONFIG_FILE_PATH = $args{c} if($args{c});
my $socket_path = $args{s};
unlink($socket_path);

my $cache = pfconfig::manager->new;
$cache->{pfconfig_server} = 1;
$cache->preload_all();

#Ensure that the file permissions of the socket is correct 0770
umask(0007);

Expand All @@ -139,10 +143,6 @@ if($config->get_proto eq "tcp") {

umask(0);

my $cache = pfconfig::manager->new;
$cache->{pfconfig_server} = 1;
$cache->preload_all();

our %DISPATCH = (
'expire' => \&expire,
'element' => \&get_element,
Expand Down

0 comments on commit 800fb29

Please sign in to comment.