From: Michael Tremer Date: Mon, 10 Sep 2012 08:33:55 +0000 (+0000) Subject: util: Create an assertion test for IP addresses. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fef4edaf2b8a271ebf78dd4e2f924711c3443844;p=people%2Fstevee%2Fnetwork.git util: Create an assertion test for IP addresses. --- diff --git a/functions.util b/functions.util index 98c80d88..54f6b3c9 100644 --- a/functions.util +++ b/functions.util @@ -171,6 +171,12 @@ function ismac() { mac_is_valid ${mac} } +function isipaddress() { + local addr=${!1} + + ip_is_valid ${addr} +} + function backtrace() { local start=1