diff options
Diffstat (limited to 'FS/FS/IP_Mixin.pm')
-rw-r--r-- | FS/FS/IP_Mixin.pm | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/FS/FS/IP_Mixin.pm b/FS/FS/IP_Mixin.pm index 0b138dd..8920ceb 100644 --- a/FS/FS/IP_Mixin.pm +++ b/FS/FS/IP_Mixin.pm @@ -94,14 +94,9 @@ sub ip_check { $self->ip_addr(''); } - # strip user-entered leading 0's from IPv4 addresses - # Parsers like NetAddr::IP interpret them as octal instead of decimal - $self->ip_addr( - join( '.', ( - map{ int($_) } - split( /\./, $self->ip_addr ) - )) - ) if $self->ip_addr =~ /\./ && $self->ip_addr =~ /[\.^]0/; + # Will strip extraneous leading zeros from ip adddresses + # e.g. 10.0.022.220 corrected to 10.0.22.220 + $self->ut_ip46n('ip_addr'); if ( $self->ip_addr and !$self->router |