summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-03-02 12:08:36 -0500
committerjim-p <jimp@pfsense.org>2011-03-02 12:08:36 -0500
commitc56828018499ef13734371e426390d711492bb68 (patch)
treec245f83f4a91c483c492eebd631b654166ffe0e8 /etc
parent199791f965b924db4a22e83695103cfd85c54bd3 (diff)
downloadpfsense-c56828018499ef13734371e426390d711492bb68.zip
pfsense-c56828018499ef13734371e426390d711492bb68.tar.gz
Slight regex fix on is_macaddr - the previous regex was letting through a mac without : separators, leading to improper validation and potentially invalid dhcp configs. Seen here http://forum.pfsense.org/index.php/topic,33830.0.html
Diffstat (limited to 'etc')
-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 eb92a95..38e6103 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}(?=([:]))(?:\\1[0-9A-F]{2}){5}$/i', $macaddr) == 1 ? true : false;
}
/* returns true if $name is a valid name for an alias */
OpenPOWER on IntegriCloud