Hi,
I have identified the issue. Problem is in how Fortigate builds index for ipAddressTable. For example, for address 192.168.188.1 OID in ipAddressTable looks like this:
.1.3.6.1.2.1.4.34.1.3.1.192.168.188.1.33
where .1.3.6.1.2.1.4.34.1.3 is base OID, 1 is address type (ipv4 in that case), 192.168.188.1 is IP address, and 33 is interface index (which is also strange because IP MIB does not specify interface index here). But the problem is that generic driver expects IP address prefixed with length, like in this example (taken from H3C switch):
.1.3.6.1.2.1.4.34.1.3.2.16.32.1.4.112.223.51.0.1.0.0.0.0.0.0.0.1
Here 2 is address type (ipv6), 16 is address length, and 32.1.4.112.223.51.0.1.0.0.0.0.0.0.0.1 is an address.
So when driver reads interface list from Fortigate it gets correct addresses from ipAddrTable and then picks incorrect addresses from ipAddressTable (168.188.1.33 in this example, shifted by one byte because server skips the one expected to hold address length).
I don't know what format is correct and what is not. Most devices that I have encountered does not support ipAddressTable at all and those that do returns addresses with length prefix. If somebody has better knowledge on this subject - please comment. For now I have added additional checks when reading ipAddressTable for correct value in length field - this should fix issue for Fortigate devices. It will be included into upcoming 3.3 release.
Best regards,
Victor
I have identified the issue. Problem is in how Fortigate builds index for ipAddressTable. For example, for address 192.168.188.1 OID in ipAddressTable looks like this:
.1.3.6.1.2.1.4.34.1.3.1.192.168.188.1.33
where .1.3.6.1.2.1.4.34.1.3 is base OID, 1 is address type (ipv4 in that case), 192.168.188.1 is IP address, and 33 is interface index (which is also strange because IP MIB does not specify interface index here). But the problem is that generic driver expects IP address prefixed with length, like in this example (taken from H3C switch):
.1.3.6.1.2.1.4.34.1.3.2.16.32.1.4.112.223.51.0.1.0.0.0.0.0.0.0.1
Here 2 is address type (ipv6), 16 is address length, and 32.1.4.112.223.51.0.1.0.0.0.0.0.0.0.1 is an address.
So when driver reads interface list from Fortigate it gets correct addresses from ipAddrTable and then picks incorrect addresses from ipAddressTable (168.188.1.33 in this example, shifted by one byte because server skips the one expected to hold address length).
I don't know what format is correct and what is not. Most devices that I have encountered does not support ipAddressTable at all and those that do returns addresses with length prefix. If somebody has better knowledge on this subject - please comment. For now I have added additional checks when reading ipAddressTable for correct value in length field - this should fix issue for Fortigate devices. It will be included into upcoming 3.3 release.
Best regards,
Victor