[PATCH] route/link: fix parsing of 'remote' attribute for GRE links

Beniamino Galvani bgalvani at redhat.com
Wed Nov 11 10:16:34 PST 2015


Fixes: 57bdc4ff4895dd91cc723d22eecadcf48945e87c

Signed-off-by: Beniamino Galvani <bgalvani at redhat.com>
---
 lib/route/link/ipgre.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/route/link/ipgre.c b/lib/route/link/ipgre.c
index 2fda637..c39a5e7 100644
--- a/lib/route/link/ipgre.c
+++ b/lib/route/link/ipgre.c
@@ -137,8 +137,8 @@ static int ipgre_parse(struct rtnl_link *link, struct nlattr *data,
 		ipgre->ipgre_mask |= IPGRE_ATTR_LOCAL;
 	}
 
-	if (tb[IFLA_GRE_LOCAL]) {
-		ipgre->remote = nla_get_u32(tb[IFLA_GRE_LOCAL]);
+	if (tb[IFLA_GRE_REMOTE]) {
+		ipgre->remote = nla_get_u32(tb[IFLA_GRE_REMOTE]);
 		ipgre->ipgre_mask |= IPGRE_ATTR_REMOTE;
 	}
 
-- 
2.4.3




More information about the libnl mailing list