mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-10-17 23:37:11 +00:00
ip-addrlabel: Fix printing of label value
Passing the return value of RTA_DATA() to rta_getattr_u32() is wrong
since that function will call RTA_DATA() by itself already.
Fixes: a7ad1c8a68
("ipaddrlabel: add json support")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
parent
c7a3b22961
commit
0b9b0d08c2
@ -95,7 +95,7 @@ int print_addrlabel(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg
|
||||
}
|
||||
|
||||
if (tb[IFAL_LABEL] && RTA_PAYLOAD(tb[IFAL_LABEL]) == sizeof(uint32_t)) {
|
||||
uint32_t label = rta_getattr_u32(RTA_DATA(tb[IFAL_LABEL]));
|
||||
uint32_t label = rta_getattr_u32(tb[IFAL_LABEL]);
|
||||
|
||||
print_uint(PRINT_ANY,
|
||||
"label", "label %u ", label);
|
||||
|
Loading…
Reference in New Issue
Block a user