Empty value for IPADDR when address contains 127.

Bug #1744116 reported by Embrapa Cnptia on 2018-01-18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ocsinventory-agent (Ubuntu)

Bug Description

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, 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.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers