From mboxrd@z Thu Jan 1 00:00:00 1970 From: Phil Sutter Subject: [iproute PATCH] ip-addrlabel: Fix printing of label value Date: Mon, 15 Oct 2018 22:20:58 +0200 Message-ID: <20181015202058.13800-1-phil@nwl.cc> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: netdev@vger.kernel.org To: Stephen Hemminger Return-path: Received: from orbyte.nwl.cc ([151.80.46.58]:53080 "EHLO orbyte.nwl.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725889AbeJPEH6 (ORCPT ); Tue, 16 Oct 2018 00:07:58 -0400 Sender: netdev-owner@vger.kernel.org List-ID: 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 --- ip/ipaddrlabel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/ipaddrlabel.c b/ip/ipaddrlabel.c index 2f79c56dcead2..8abe5722bafd1 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); -- 2.19.0