Thread (5 messages) 5 messages, 2 authors, 2017-12-16

[PATCH iproute2 3/3] ip: gre: fix IFLA_GRE_LINK attribute sizing

flat view
STALE3232d

From: Serhey Popovych <hidden>
Date: 2017-12-13 19:36:37
Subsystem: the rest · Maintainer: Linus Torvalds

Attribute IFLA_GRE_LINK is 32 bit long, not 8 bit.

Signed-off-by: Serhey Popovych <redacted>
---
 ip/link_gre.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ip/link_gre.c b/ip/link_gre.c
index 6f82fb4..09f1e44 100644
--- a/ip/link_gre.c
+++ b/ip/link_gre.c
@@ -155,7 +155,7 @@ get_failed:
 			tos = rta_getattr_u8(greinfo[IFLA_GRE_TOS]);
 
 		if (greinfo[IFLA_GRE_LINK])
-			link = rta_getattr_u8(greinfo[IFLA_GRE_LINK]);
+			link = rta_getattr_u32(greinfo[IFLA_GRE_LINK]);
 
 		if (greinfo[IFLA_GRE_ENCAP_TYPE])
 			encaptype = rta_getattr_u16(greinfo[IFLA_GRE_ENCAP_TYPE]);
-- 
1.7.10.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help