aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2016-04-25 04:25:16 -0400
committerDavid S. Miller <davem@davemloft.net>2016-04-25 15:09:10 -0400
commitf13a82d87b21a3b7c2c3e3c75fe9cf810c332a09 (patch)
tree0861e04278e9f0942177132e2c509f1fe7b38c61
parent2a51c1e8ecdcedfcb6f84efb3756822d0d0dfb36 (diff)
ipv6: use nla_put_u64_64bit()
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/uapi/linux/ila.h1
-rw-r--r--net/ipv6/ila/ila_lwt.c3
-rw-r--r--net/ipv6/ila/ila_xlat.c15
3 files changed, 12 insertions, 7 deletions
diff --git a/include/uapi/linux/ila.h b/include/uapi/linux/ila.h
index abde7bbd6f3b..cd97951680bf 100644
--- a/include/uapi/linux/ila.h
+++ b/include/uapi/linux/ila.h
@@ -14,6 +14,7 @@ enum {
14 ILA_ATTR_LOCATOR_MATCH, /* u64 */ 14 ILA_ATTR_LOCATOR_MATCH, /* u64 */
15 ILA_ATTR_IFINDEX, /* s32 */ 15 ILA_ATTR_IFINDEX, /* s32 */
16 ILA_ATTR_DIR, /* u32 */ 16 ILA_ATTR_DIR, /* u32 */
17 ILA_ATTR_PAD,
17 18
18 __ILA_ATTR_MAX, 19 __ILA_ATTR_MAX,
19}; 20};
diff --git a/net/ipv6/ila/ila_lwt.c b/net/ipv6/ila/ila_lwt.c
index 2ae3c4fd8aab..9db3621b2126 100644
--- a/net/ipv6/ila/ila_lwt.c
+++ b/net/ipv6/ila/ila_lwt.c
@@ -109,7 +109,8 @@ static int ila_fill_encap_info(struct sk_buff *skb,
109{ 109{
110 struct ila_params *p = ila_params_lwtunnel(lwtstate); 110 struct ila_params *p = ila_params_lwtunnel(lwtstate);
111 111
112 if (nla_put_u64(skb, ILA_ATTR_LOCATOR, (__force u64)p->locator)) 112 if (nla_put_u64_64bit(skb, ILA_ATTR_LOCATOR, (__force u64)p->locator,
113 ILA_ATTR_PAD))
113 goto nla_put_failure; 114 goto nla_put_failure;
114 115
115 return 0; 116 return 0;
diff --git a/net/ipv6/ila/ila_xlat.c b/net/ipv6/ila/ila_xlat.c
index 0b03533453e4..0e9e579410da 100644
--- a/net/ipv6/ila/ila_xlat.c
+++ b/net/ipv6/ila/ila_xlat.c
@@ -418,12 +418,15 @@ static int ila_nl_cmd_del_mapping(struct sk_buff *skb, struct genl_info *info)
418 418
419static int ila_fill_info(struct ila_map *ila, struct sk_buff *msg) 419static int ila_fill_info(struct ila_map *ila, struct sk_buff *msg)
420{ 420{
421 if (nla_put_u64(msg, ILA_ATTR_IDENTIFIER, 421 if (nla_put_u64_64bit(msg, ILA_ATTR_IDENTIFIER,
422 (__force u64)ila->p.identifier) || 422 (__force u64)ila->p.identifier,
423 nla_put_u64(msg, ILA_ATTR_LOCATOR, 423 ILA_ATTR_PAD) ||
424 (__force u64)ila->p.ip.locator) || 424 nla_put_u64_64bit(msg, ILA_ATTR_LOCATOR,
425 nla_put_u64(msg, ILA_ATTR_LOCATOR_MATCH, 425 (__force u64)ila->p.ip.locator,
426 (__force u64)ila->p.ip.locator_match) || 426 ILA_ATTR_PAD) ||
427 nla_put_u64_64bit(msg, ILA_ATTR_LOCATOR_MATCH,
428 (__force u64)ila->p.ip.locator_match,
429 ILA_ATTR_PAD) ||
427 nla_put_s32(msg, ILA_ATTR_IFINDEX, ila->p.ifindex) || 430 nla_put_s32(msg, ILA_ATTR_IFINDEX, ila->p.ifindex) ||
428 nla_put_u32(msg, ILA_ATTR_DIR, ila->p.dir)) 431 nla_put_u32(msg, ILA_ATTR_DIR, ila->p.dir))
429 return -1; 432 return -1;