Adapt to netlink changes introduced in kernel v3.8
The kernel assigns nt_pid(portid) the process ID to the first netlink socket.
For subsequent netlink socket that the process creates, it assigns value
between 0xFFFFFFFFFFFFEFFF(-4097) and 0x8000000000000000(-2147483648).
pre-v3.8 netlink presents portid in procfs as signed int.
v3.8 changes presentation of portid to unsigned.
This change has no impact for the portid which was assigned the process id.
But in other cases, it causes trouble for Java Integer to decode these values,
because they are larger than the Integer.MAX_VALUE.
To decode these unsigned int values, we have to use Java Long type.
Signed-off-by: Guobin Zhang <email@example.com>
Signed-off-by: Jack Ren <firstname.lastname@example.org>
Signed-off-by: Bruce Beare <email@example.com>
(cherry picked from commit e777c2e418eef078c05af3b225784d3bb15e983b)
1 file changed