]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
ip: gre: fix IFLA_GRE_LINK attribute sizing
authorSerhey Popovych <serhe.popovych@gmail.com>
Wed, 13 Dec 2017 19:36:02 +0000 (21:36 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Sat, 16 Dec 2017 18:08:54 +0000 (10:08 -0800)
Attribute IFLA_GRE_LINK is 32 bit long, not 8 bit.

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
ip/link_gre.c

index 6f82fb4e6ac0156cfa4f3e7f3548e64ecae3f02e..09f1e441a6fe3014f1943e03dee43b8bce0fb459 100644 (file)
@@ -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]);