From mboxrd@z Thu Jan 1 00:00:00 1970 From: Serhey Popovych Subject: [PATCH iproute2 3/3] ip: gre: fix IFLA_GRE_LINK attribute sizing Date: Wed, 13 Dec 2017 21:36:02 +0200 Message-ID: <1513193762-1580-4-git-send-email-serhe.popovych@gmail.com> References: <1513193762-1580-1-git-send-email-serhe.popovych@gmail.com> To: netdev@vger.kernel.org Return-path: Received: from mail-lf0-f67.google.com ([209.85.215.67]:33696 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751644AbdLMTgh (ORCPT ); Wed, 13 Dec 2017 14:36:37 -0500 Received: by mail-lf0-f67.google.com with SMTP id 74so3988711lfs.0 for ; Wed, 13 Dec 2017 11:36:36 -0800 (PST) Received: from tuxracer.localdomain ([2a01:6d80::195:20:96:53]) by smtp.gmail.com with ESMTPSA id j85sm478237lfh.53.2017.12.13.11.36.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Dec 2017 11:36:34 -0800 (PST) In-Reply-To: <1513193762-1580-1-git-send-email-serhe.popovych@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: Attribute IFLA_GRE_LINK is 32 bit long, not 8 bit. Signed-off-by: Serhey Popovych --- 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