net-tools icon indicating copy to clipboard operation
net-tools copied to clipboard

route: read, store and output metric as uint32_t

Open mguentner opened this issue 1 year ago • 0 comments

adding a route metric greater than 0x7fff_ffff leads to an unintended wrap when treating the metric as an unsigned int (%d) thus incorrectly rendering the metric as negative. Formatting using %u corrects the issue.

Relevant Linux patch:

https://lore.kernel.org/netdev/[email protected]/

This commit does not require a patched kernel or vice versa.

mguentner avatar Dec 16 '24 13:12 mguentner