diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-02-02 09:12:36 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-02-02 09:12:36 -0800 |
commit | fed73592cfd6fd2f87aad1669d1b9ebecfa03cdc (patch) | |
tree | 593d14ce30f866ab334d2662be3972c8a8ea016e /scripts/check-ipv4-ipv6.pl | |
parent | 831abebf172d4350849aecca838547f8878f36d1 (diff) | |
download | vyatta-cfg-quagga-fed73592cfd6fd2f87aad1669d1b9ebecfa03cdc.tar.gz vyatta-cfg-quagga-fed73592cfd6fd2f87aad1669d1b9ebecfa03cdc.zip |
Static host-name mapping changes
Fix help text (Bug 5254) and allow IPV6 static mapping (Bug 5298)
Diffstat (limited to 'scripts/check-ipv4-ipv6.pl')
-rw-r--r-- | scripts/check-ipv4-ipv6.pl | 12 |
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; +} + |