ip: gre: fix IFLA_GRE_LINK attribute sizing

Attribute IFLA_GRE_LINK is 32 bit long, not 8 bit.

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
This commit is contained in:
Serhey Popovych 2017-12-13 21:36:02 +02:00 committed by Stephen Hemminger
parent 9aceaad71b
commit a6addd5cdc
1 changed files with 1 additions and 1 deletions

View 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]);