ipv6: use nla_put_u64_64bit()
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Mon, 25 Apr 2016 08:25:16 +0000 (10:25 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Apr 2016 19:09:10 +0000 (15:09 -0400)
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/ila.h
net/ipv6/ila/ila_lwt.c
net/ipv6/ila/ila_xlat.c

index abde7bbd6f3b7c2e59b9b7f52baa758731ccde85..cd97951680bf6ecd769139aaab2769dadd508ff2 100644 (file)
@@ -14,6 +14,7 @@ enum {
        ILA_ATTR_LOCATOR_MATCH,                 /* u64 */
        ILA_ATTR_IFINDEX,                       /* s32 */
        ILA_ATTR_DIR,                           /* u32 */
+       ILA_ATTR_PAD,
 
        __ILA_ATTR_MAX,
 };
index 2ae3c4fd8aabc65a7206a73480b3dca4b975f7e3..9db3621b2126c1bfd2165025753a3a6dfb7b3423 100644 (file)
@@ -109,7 +109,8 @@ static int ila_fill_encap_info(struct sk_buff *skb,
 {
        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;
 
        return 0;
index 0b03533453e4e9fdd3f9208ac0fe8913f169f9be..0e9e579410daf9948c53e2d8027837bc72f34851 100644 (file)
@@ -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)
 {
-       if (nla_put_u64(msg, ILA_ATTR_IDENTIFIER,
-                       (__force u64)ila->p.identifier) ||
-           nla_put_u64(msg, ILA_ATTR_LOCATOR,
-                       (__force u64)ila->p.ip.locator) ||
-           nla_put_u64(msg, ILA_ATTR_LOCATOR_MATCH,
-                       (__force u64)ila->p.ip.locator_match) ||
+       if (nla_put_u64_64bit(msg, ILA_ATTR_IDENTIFIER,
+                             (__force u64)ila->p.identifier,
+                             ILA_ATTR_PAD) ||
+           nla_put_u64_64bit(msg, ILA_ATTR_LOCATOR,
+                             (__force u64)ila->p.ip.locator,
+                             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_u32(msg, ILA_ATTR_DIR, ila->p.dir))
                return -1;