summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/check-ipv4-ipv6.pl12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/check-ipv4-ipv6.pl b/scripts/check-ipv4-ipv6.pl
new file mode 100644
index 00000000..0816ebee
--- /dev/null
+++ b/scripts/check-ipv4-ipv6.pl
@@ -0,0 +1,12 @@
+#! /usr/bin/perl
+
+# Trivial script to check for valid IPv4 or IPv6 address
+
+use strict;
+use NetAddr::IP;
+
+foreach my $addr (@ARGV) {
+ die "$addr: not valid a valid IPv4 or IPv6 address\n"
+ unless new NetAddr::IP $addr;
+}
+