X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FIP_Mixin.pm;h=1967ccd573399c618234ca37df6f658e1dcc2a2e;hp=fc3a0146b04ac83924372b56da10561676864950;hb=20f03d52cc6c930f610c0b4466eeeeda54fdbb40;hpb=6de42f2b2f6c58cf6ce0db933c2d8d5d40b411ca diff --git a/FS/FS/IP_Mixin.pm b/FS/FS/IP_Mixin.pm index fc3a0146b..1967ccd57 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