[BGPCEP-971] Graph from BGP-LS is not able to handle correctly IPv4 addresses Created: 16/Jul/21  Updated: 20/Jul/21  Resolved: 20/Jul/21

Status: Resolved
Project: bgpcep
Component/s: BGP
Affects Version/s: None
Fix Version/s: 0.16.1, Silicon SR2

Type: Bug Priority: High
Reporter: Olivier Dugeon Assignee: Olivier Dugeon
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

If IPv4 addresses are greater then 127.255.255.255 e.g. 192.168.1.1, Graph is not correctly fulfill from BGP-LS.

LinkStateGraphBuilder thrown an error due to negative key value. Indeed, the link key is derived from the IPv4 address, but cast is not correctly done and signed value is propagated instead of 64 bits unsigned integer.

Ipv4toKey() function in LinkStateGraphBuilder wrongly compute Long from an
IP address. IP address above 128.0.0.0 are converted as a negative value
which trigger a java exception when converted to Uint64. Need to change the
function to use ByteBuffer wrapper like for Ipv6ToKey() function.


Generated at Wed Feb 07 19:14:38 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.