summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces.php
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2005-04-14 02:21:58 +0000
committerBill Marquette <billm@pfsense.org>2005-04-14 02:21:58 +0000
commit4f3401e0db4bd4964bafe36020e7aebfa62afb59 (patch)
tree197b27020f574a5b8c19289b8315bdefdd338bbf /usr/local/www/interfaces.php
parent629dd875f66411c15fbaefd59fc63f8ffa21f648 (diff)
downloadpfsense-4f3401e0db4bd4964bafe36020e7aebfa62afb59.zip
pfsense-4f3401e0db4bd4964bafe36020e7aebfa62afb59.tar.gz
normalize MAC addresses
Diffstat (limited to 'usr/local/www/interfaces.php')
-rwxr-xr-xusr/local/www/interfaces.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 11fc307..4edb6fe 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -117,6 +117,9 @@ if ($_POST) {
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
}
+ /* normalize MAC addresses - lowercase and convert Windows-ized hyphenated MACs to colon delimited */
+ $_POST['spoofmac'] = strtolower(str_replace("-", ":", $_POST['spoofmac']));
+
if (($_POST['ipaddr'] && !is_ipaddr($_POST['ipaddr']))) {
$input_errors[] = "A valid IP address must be specified.";
}
OpenPOWER on IntegriCloud