projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
strip _ out of MAC address fields, #19114
[freeside.git]
/
FS
/
FS
/
svc_broadband.pm
diff --git
a/FS/FS/svc_broadband.pm
b/FS/FS/svc_broadband.pm
index
1a3adf4
..
869d9a5
100755
(executable)
--- a/
FS/FS/svc_broadband.pm
+++ b/
FS/FS/svc_broadband.pm
@@
-313,7
+313,12
@@
Returns the IP address.
sub label {
my $self = shift;
sub label {
my $self = shift;
- $self->ip_addr;
+ my $label = 'IP:'. ($self->ip_addr || 'Unknown');
+ $label .= '", MAC:'. $self->mac_addr
+ if $self->mac_addr;
+ $label .= ' ('. $self->description. ')'
+ if $self->description;
+ return $label;
}
=item insert [ , OPTION => VALUE ... ]
}
=item insert [ , OPTION => VALUE ... ]
@@
-377,7
+382,7
@@
sub check {
# remove delimiters
my $mac_addr = uc($self->get('mac_addr'));
# 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 =
$self->set('mac_addr', $mac_addr);
my $error =