From: Phil Sutter Date: Mon, 15 Oct 2018 20:20:58 +0000 (+0200) Subject: ip-addrlabel: Fix printing of label value X-Git-Tag: v4.19.0~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b9b0d08c29f9aa6cc1b83c853964d9cc18dc6f2;p=thirdparty%2Fiproute2.git 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: a7ad1c8a6845d ("ipaddrlabel: add json support") Signed-off-by: Phil Sutter Signed-off-by: Stephen Hemminger --- diff --git a/ip/ipaddrlabel.c b/ip/ipaddrlabel.c index 2f79c56dc..8abe5722b 100644 --- a/ip/ipaddrlabel.c +++ b/ip/ipaddrlabel.c @@ -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);