Commit f13a82d8 authored by Nicolas Dichtel's avatar Nicolas Dichtel Committed by David S. Miller

ipv6: use nla_put_u64_64bit()

Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2a51c1e8
...@@ -14,6 +14,7 @@ enum { ...@@ -14,6 +14,7 @@ enum {
ILA_ATTR_LOCATOR_MATCH, /* u64 */ ILA_ATTR_LOCATOR_MATCH, /* u64 */
ILA_ATTR_IFINDEX, /* s32 */ ILA_ATTR_IFINDEX, /* s32 */
ILA_ATTR_DIR, /* u32 */ ILA_ATTR_DIR, /* u32 */
ILA_ATTR_PAD,
__ILA_ATTR_MAX, __ILA_ATTR_MAX,
}; };
......
...@@ -109,7 +109,8 @@ static int ila_fill_encap_info(struct sk_buff *skb, ...@@ -109,7 +109,8 @@ static int ila_fill_encap_info(struct sk_buff *skb,
{ {
struct ila_params *p = ila_params_lwtunnel(lwtstate); struct ila_params *p = ila_params_lwtunnel(lwtstate);
if (nla_put_u64(skb, ILA_ATTR_LOCATOR, (__force u64)p->locator)) if (nla_put_u64_64bit(skb, ILA_ATTR_LOCATOR, (__force u64)p->locator,
ILA_ATTR_PAD))
goto nla_put_failure; goto nla_put_failure;
return 0; return 0;
......
...@@ -418,12 +418,15 @@ static int ila_nl_cmd_del_mapping(struct sk_buff *skb, struct genl_info *info) ...@@ -418,12 +418,15 @@ static int ila_nl_cmd_del_mapping(struct sk_buff *skb, struct genl_info *info)
static int ila_fill_info(struct ila_map *ila, struct sk_buff *msg) static int ila_fill_info(struct ila_map *ila, struct sk_buff *msg)
{ {
if (nla_put_u64(msg, ILA_ATTR_IDENTIFIER, if (nla_put_u64_64bit(msg, ILA_ATTR_IDENTIFIER,
(__force u64)ila->p.identifier) || (__force u64)ila->p.identifier,
nla_put_u64(msg, ILA_ATTR_LOCATOR, ILA_ATTR_PAD) ||
(__force u64)ila->p.ip.locator) || nla_put_u64_64bit(msg, ILA_ATTR_LOCATOR,
nla_put_u64(msg, ILA_ATTR_LOCATOR_MATCH, (__force u64)ila->p.ip.locator,
(__force u64)ila->p.ip.locator_match) || ILA_ATTR_PAD) ||
nla_put_u64_64bit(msg, ILA_ATTR_LOCATOR_MATCH,
(__force u64)ila->p.ip.locator_match,
ILA_ATTR_PAD) ||
nla_put_s32(msg, ILA_ATTR_IFINDEX, ila->p.ifindex) || nla_put_s32(msg, ILA_ATTR_IFINDEX, ila->p.ifindex) ||
nla_put_u32(msg, ILA_ATTR_DIR, ila->p.dir)) nla_put_u32(msg, ILA_ATTR_DIR, ila->p.dir))
return -1; return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment