ipv4: output metric as unsigned int
authorMaximilian Güntner <code@mguentner.de>
Thu, 12 Dec 2024 16:19:11 +0000 (17:19 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sun, 15 Dec 2024 21:13:40 +0000 (13:13 -0800)
commit329365dc46b8cedb9c4fd5cfb80b29cb85b84c39
tree78dd7f28814da7d0f3dede4a353c443be32da2e8
parentab2cedb0d4fcecba6d241ad1bdc674a0af625641
ipv4: output metric as unsigned int

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

Signed-off-by: Maximilian Güntner <code@mguentner.de>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20241212161911.51598-1-code@mguentner.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/fib_trie.c