naccyde / rpms / iproute

Forked from rpms/iproute 5 months ago
Clone

Blame SOURCES/0019-ip-addrlabel-Fix-printing-of-label-value.patch

7e752c
From fd07e443d264ddf25d4152af3a44144e1a9b3fd9 Mon Sep 17 00:00:00 2001
7e752c
From: Phil Sutter <psutter@redhat.com>
7e752c
Date: Thu, 18 Oct 2018 10:52:51 +0200
7e752c
Subject: [PATCH] ip-addrlabel: Fix printing of label value
7e752c
7e752c
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1639412
7e752c
Upstream Status: iproute2.git commit 0b9b0d08c29f9
7e752c
7e752c
commit 0b9b0d08c29f9aa6cc1b83c853964d9cc18dc6f2
7e752c
Author: Phil Sutter <phil@nwl.cc>
7e752c
Date:   Mon Oct 15 22:20:58 2018 +0200
7e752c
7e752c
    ip-addrlabel: Fix printing of label value
7e752c
7e752c
    Passing the return value of RTA_DATA() to rta_getattr_u32() is wrong
7e752c
    since that function will call RTA_DATA() by itself already.
7e752c
7e752c
    Fixes: a7ad1c8a6845d ("ipaddrlabel: add json support")
7e752c
    Signed-off-by: Phil Sutter <phil@nwl.cc>
7e752c
    Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
7e752c
---
7e752c
 ip/ipaddrlabel.c | 2 +-
7e752c
 1 file changed, 1 insertion(+), 1 deletion(-)
7e752c
7e752c
diff --git a/ip/ipaddrlabel.c b/ip/ipaddrlabel.c
7e752c
index 2f79c56..8abe572 100644
7e752c
--- a/ip/ipaddrlabel.c
7e752c
+++ b/ip/ipaddrlabel.c
7e752c
@@ -95,7 +95,7 @@ int print_addrlabel(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg
7e752c
 	}
7e752c
 
7e752c
 	if (tb[IFAL_LABEL] && RTA_PAYLOAD(tb[IFAL_LABEL]) == sizeof(uint32_t)) {
7e752c
-		uint32_t label = rta_getattr_u32(RTA_DATA(tb[IFAL_LABEL]));
7e752c
+		uint32_t label = rta_getattr_u32(tb[IFAL_LABEL]);
7e752c
 
7e752c
 		print_uint(PRINT_ANY,
7e752c
 			   "label", "label %u ", label);
7e752c
-- 
7e752c
1.8.3.1
7e752c