summaryrefslogtreecommitdiffstats
path: root/etc/inc/util.inc
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2011-03-02 10:24:12 -0700
committerErik Fonnesbeck <efonnes@gmail.com>2011-03-02 10:24:12 -0700
commit56f25370a61cedae18a925cb934d05c8c0560f9d (patch)
tree5c0ab37754dc213d926672e8a7302dc37a77939e /etc/inc/util.inc
parentc56828018499ef13734371e426390d711492bb68 (diff)
downloadpfsense-56f25370a61cedae18a925cb934d05c8c0560f9d.zip
pfsense-56f25370a61cedae18a925cb934d05c8c0560f9d.tar.gz
Simplify is_macaddr regex.
Diffstat (limited to 'etc/inc/util.inc')
-rw-r--r--etc/inc/util.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index 38e6103..b7df86b 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -463,7 +463,7 @@ function is_domain($domain) {
/* returns true if $macaddr is a valid MAC address */
function is_macaddr($macaddr) {
- return preg_match('/^[0-9A-F]{2}(?=([:]))(?:\\1[0-9A-F]{2}){5}$/i', $macaddr) == 1 ? true : false;
+ return preg_match('/^[0-9A-F]{2}(?:[:][0-9A-F]{2}){5}$/i', $macaddr) == 1 ? true : false;
}
/* returns true if $name is a valid name for an alias */
OpenPOWER on IntegriCloud