From 132a5ebcb879c654f65427b8f2a96a511a1cabfd Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Wed, 29 Jan 2025 15:15:40 +0100 Subject: [PATCH] clusterd: Move is_trusted_ip() up --- clusterd/clusterd | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/clusterd/clusterd b/clusterd/clusterd index 09e40ce..d40c351 100755 --- a/clusterd/clusterd +++ b/clusterd/clusterd @@ -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) @@ -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) = @_;