]> git.ipfire.org Git - network.git/commitdiff
util: Create an assertion test for IP addresses.
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 10 Sep 2012 08:33:55 +0000 (08:33 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 10 Sep 2012 08:33:55 +0000 (08:33 +0000)
functions.util

index 98c80d882f186cb89a3e1541d3b6f5070dbc4642..54f6b3c9351ab895a4cd4b9cf6216875038be095 100644 (file)
@@ -171,6 +171,12 @@ function ismac() {
        mac_is_valid ${mac}
 }
 
+function isipaddress() {
+       local addr=${!1}
+
+       ip_is_valid ${addr}
+}
+
 function backtrace() {
        local start=1