Linux agent recording default gateway as gateway for all interfaces
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OCS Inventory: Unified Unix Agent |
Fix Released
|
Medium
|
mortheres |
Bug Description
In trying to use the network interface data from our Linux hosts, we have notice that the OCS agent is recording the default gateway as the gateway for all interfaces on the host, even if that interface is down or doesn't have an IP assigned. I believe that this is incorrect behavior and that it should only be recording a gateway for interfaces that appear in the routing table.
I am seeing this both on version 2.0 and 2.1 versions of the agent. The Windows agent produces the "correct" results.
As an example, for a host with the following routing table:
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
172.16.185.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet1
172.20.254.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
172.16.238.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet8
10.67.4.0 0.0.0.0 255.255.252.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 10.67.4.1 0.0.0.0 UG 0 0 0 eth0
I find the following in the XML generated by the agent:
<NETWORKS>
<
<
<
<
<
<
<
<
<
<
<
</NETWORKS>
<NETWORKS>
<
<
<
<
<
<
<
<
</NETWORKS>
<NETWORKS>
<
<
<
<
<
<
<
<
<
</NETWORKS>
<NETWORKS>
<
<
<
<
<
<
<
</NETWORKS>
<NETWORKS>
<
<
<
<
<
<
<
<
<
</NETWORKS>
<NETWORKS>
<
<
<
<
<
<
<
<
<
</NETWORKS>
I can understand having the default gateway on eth0, vmnet1, virbr0 and vmnet8, but eth1 and vibr0-nic should have no default gateway. On windows hosts I see the address, netmask, gateway, and network number all set to 0.0.0.0 for down interfaces, which probably makes more sense.
Changed in ocsinventory-unix-agent: | |
status: | Fix Committed → Fix Released |
HI,
Can you tell us on which Linux distribution and its version you have the problem ? It will help us for debugging purpose.
Thanks in advance.
Kind regards
--
Guillaume