From: Serhey Popovych Date: Wed, 13 Dec 2017 19:36:02 +0000 (+0200) Subject: ip: gre: fix IFLA_GRE_LINK attribute sizing X-Git-Tag: v4.15.0~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6addd5cdcec2391732c6b4fc076f3319e45296e;p=thirdparty%2Fiproute2.git ip: gre: fix IFLA_GRE_LINK attribute sizing Attribute IFLA_GRE_LINK is 32 bit long, not 8 bit. Signed-off-by: Serhey Popovych --- diff --git a/ip/link_gre.c b/ip/link_gre.c index 6f82fb4e6..09f1e441a 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]);