net-tools
net-tools copied to clipboard
route: read, store and output metric as uint32_t
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.