diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2015-11-11 18:16:34 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-11-19 15:14:06 (GMT) |
commit | a0b2710ed924d5107eae331643304e7364b1421e (patch) | |
tree | ca96e62c39ba469ab6f3d386e1569bc387e4c1ae /lib | |
parent | 5f044aca765fa6620b389b50deee9cf49c1efe35 (diff) | |
download | libnl-a0b2710ed924d5107eae331643304e7364b1421e.zip libnl-a0b2710ed924d5107eae331643304e7364b1421e.tar.gz libnl-a0b2710ed924d5107eae331643304e7364b1421e.tar.bz2 |
route/link: fix parsing of 'remote' attribute for GRE links
Fixes: 57bdc4ff4895dd91cc723d22eecadcf48945e87c
http://lists.infradead.org/pipermail/libnl/2015-November/002004.html
Signed-off-by: Beniamino Galvani <bgalvani@redhat.com>
[thaller@redhat.com: add capability to indicate bug-fix]
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/route/link/ipgre.c | 4 | ||||
-rw-r--r-- | lib/utils.c | 2 |
2 files changed, 3 insertions, 3 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; } diff --git a/lib/utils.c b/lib/utils.c index 21b4205..92b481c 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -1156,7 +1156,7 @@ int nl_has_capability (int capability) NL_CAPABILITY_RTNL_NEIGH_GET_FILTER_AF_UNSPEC_FIX, NL_CAPABILITY_VERSION_3_2_27, NL_CAPABILITY_RTNL_LINK_VLAN_PROTOCOL_SERIALZE, - 0, + NL_CAPABILITY_RTNL_LINK_PARSE_GRE_REMOTE, 0, 0, 0), |