diff options
author | Ole Mathias Heggem <olemathias.aa.heggem@gmail.com> | 2023-01-21 19:07:38 +0100 |
---|---|---|
committer | Ole Mathias Heggem <olemathias.aa.heggem@gmail.com> | 2023-01-21 19:07:38 +0100 |
commit | 709c78569b26677624e60588fa1166dc659ac93c (patch) | |
tree | 2bd5555af31b637d03693b8563fb24b41bf1f22b /web/stream.gathering.org/streamlib/stream.pm | |
parent | f5da0d943401e527f5162e9c6344deb65b19b045 (diff) |
chore: cleanup repo
Diffstat (limited to 'web/stream.gathering.org/streamlib/stream.pm')
-rw-r--r-- | web/stream.gathering.org/streamlib/stream.pm | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/web/stream.gathering.org/streamlib/stream.pm b/web/stream.gathering.org/streamlib/stream.pm deleted file mode 100644 index c28136e..0000000 --- a/web/stream.gathering.org/streamlib/stream.pm +++ /dev/null @@ -1,36 +0,0 @@ -package stream; -use strict; -use warnings; - -BEGIN { - use Exporter(); - - our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); - - @ISA = qw(Exporter); - $VERSION = 1.00; - @EXPORT = qw(&is_ip_local); - -} - -sub is_ip_local($$$) { - my $clip = shift; - my $v4net = shift; - my $v6net = shift; - return 0 unless defined($clip); - - my $is_local = 0; - if ($clip =~ m/\:/){ - if (NetAddr::IP->new($clip)->within($v6net)){ - $is_local = 1; - } - } else { - if (NetAddr::IP->new($clip)->within($v4net)){ - $is_local = 1; - } - } - return $is_local; -} - - -1; |