Netdev List
 help / color / mirror / Atom feed
* [iproute PATCH] ip-addrlabel: Fix printing of label value
@ 2018-10-15 20:20 Phil Sutter
  0 siblings, 0 replies; only message in thread
From: Phil Sutter @ 2018-10-15 20:20 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev

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 <phil@nwl.cc>
---
 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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-10-16  4:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-15 20:20 [iproute PATCH] ip-addrlabel: Fix printing of label value Phil Sutter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox