Skip to content

Commit

Permalink
clusterd: Move is_trusted_ip() up
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Jan 29, 2025
1 parent ed78765 commit 132a5eb
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions clusterd/clusterd
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,16 @@ sub decode {
return @$msg;
}

our %TRUSTED_IP = (
'141.14.28.170' => 1, # afk
'141.14.16.131' => 1, # wtf
);

sub is_trusted_ip {
my ($ip) = @_;
return exists $TRUSTED_IP{$ip} ? 1 : 0;
}

#---------------------------------------------------------- UDP

our ($udp_peer_addr,$udp_peer_port); # ('141.14.12.12',1234)
Expand Down Expand Up @@ -1367,16 +1377,6 @@ sub clp_rx_PULL {
My::Select::writer($s,$cb_write);
}

our %TRUSTED_IP = (
'141.14.28.170' => 1, # afk
'141.14.16.131' => 1, # wtf
);

sub is_trusted_ip {
my ($ip) = @_;
return exists $TRUSTED_IP{$ip} ? 1 : 0;
}

sub udp_rx_push2 {
my ($ip, $st_ary, $post_ary) = @_;

Expand Down

0 comments on commit 132a5eb

Please sign in to comment.