Quantcast
Channel: Ocsinventory Q&A - Recent questions without answers
Viewing all articles
Browse latest Browse all 4599

Empty value for IPADDR when address contains 127.

$
0
0

All reports from hosts that contains 127. or ::1/128 in the address send the report with empty in IPADDR value to the server. For example, 192.168.127.25 will send empty IPADDR.

The problem seems to be on file IPv4.pm or IP.pm in all operating systems in all versions. 

This line is the problem:

AIX/IPv4.pm:    if(/^\s*inet\s+(\S+).*/){($1=~/127.+/)?next:push @ip, $1};
BSD/IPv4.pm:      ($1=~/127.+/)?next:push @ip, $1
Linux/Network/IPv4.pm:      ($1=~/127.+/)?next:push @ip, $1
MacOS/IPv4.pm:        ($1=~/127.+/)?next:push @ip, $1
Solaris/IPv4.pm:    if(/^\s*inet\s+(\S+).*/){($1=~/127.+/)?next:($ip{$1}=1)};
Solaris/Bios.pm:#Kernel version: SunOS 5.10 Generic_127112-07

If we change to:

Linux/Network/IPv4.pm:      ($1=~/^127.+/)?next:push @ip, $1

the report send the IPADDR value.

The same for IPv6 in version 2.3. 

Linux/Network/IP.pm:                ($1=~/::1\/128/)?next:push @ip, $1;
Linux/Network/IP.pm:                ($1=~/::1/)?next:push @ip, $1;

The solution is the same on the regex, including ^ before ::1.

Carlos Paniago e Jorge Correa


Viewing all articles
Browse latest Browse all 4599

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>