diff options
author | Mark Wells <mark@freeside.biz> | 2013-02-26 21:06:51 -0800 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2013-02-26 21:06:51 -0800 |
commit | 9e0c782a41292cac8d06f0a3b3ef54b7dc5f5a27 (patch) | |
tree | 470669c41844c02302c2c6be25dface386707a0b /FS | |
parent | 46012a1b4f0c95cce0fb60537125ee43386ef09e (diff) |
strip _ out of MAC address fields, #19114
Diffstat (limited to 'FS')
-rwxr-xr-x | FS/FS/svc_broadband.pm | 2 | ||||
-rw-r--r-- | FS/FS/svc_hardware.pm | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/FS/FS/svc_broadband.pm b/FS/FS/svc_broadband.pm index 3b0b01534..869d9a537 100755 --- a/FS/FS/svc_broadband.pm +++ b/FS/FS/svc_broadband.pm @@ -382,7 +382,7 @@ sub check { # remove delimiters my $mac_addr = uc($self->get('mac_addr')); - $mac_addr =~ s/[-: ]//g; + $mac_addr =~ s/[\W_]//g; $self->set('mac_addr', $mac_addr); my $error = diff --git a/FS/FS/svc_hardware.pm b/FS/FS/svc_hardware.pm index af6865f12..96502e41e 100644 --- a/FS/FS/svc_hardware.pm +++ b/FS/FS/svc_hardware.pm @@ -164,7 +164,7 @@ sub check { return $x unless ref $x; my $hw_addr = $self->getfield('hw_addr'); - $hw_addr = join('', split(/\W/, $hw_addr)); + $hw_addr = join('', split(/[_\W]/, $hw_addr)); if ( $conf->exists('svc_hardware-check_mac_addr') ) { $hw_addr = uc($hw_addr); $hw_addr =~ /^[0-9A-F]{12}$/ |