From 9a6320744d21416d1f1eb3a3ba168cf54ef59727 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Mon, 14 May 2018 03:16:44 +0200 Subject: Add some ipaddrcheck-based IP validators. --- src/validators/interface-address | 3 +++ src/validators/ipv4-address | 3 +++ src/validators/ipv6-address | 3 +++ 3 files changed, 9 insertions(+) create mode 100755 src/validators/interface-address create mode 100755 src/validators/ipv4-address create mode 100755 src/validators/ipv6-address (limited to 'src/validators') diff --git a/src/validators/interface-address b/src/validators/interface-address new file mode 100755 index 000000000..4c203956b --- /dev/null +++ b/src/validators/interface-address @@ -0,0 +1,3 @@ +#!/bin/sh + +ipaddrcheck --is-ipv4-host $1 || ipaddrcheck --is-ipv6-host $1 diff --git a/src/validators/ipv4-address b/src/validators/ipv4-address new file mode 100755 index 000000000..872a7645a --- /dev/null +++ b/src/validators/ipv4-address @@ -0,0 +1,3 @@ +#!/bin/sh + +ipaddrcheck --is-ipv4-single $1 diff --git a/src/validators/ipv6-address b/src/validators/ipv6-address new file mode 100755 index 000000000..e5d68d756 --- /dev/null +++ b/src/validators/ipv6-address @@ -0,0 +1,3 @@ +#!/bin/sh + +ipaddrcheck --is-ipv6-single $1 -- cgit v1.2.3