diff options
author | Nicolas Dichtel <nicolas.dichtel@6wind.com> | 2016-04-22 17:31:18 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-23 20:13:24 -0400 |
commit | b46f6ded906ef0be52a4881ba50a084aeca64d7e (patch) | |
tree | b17273779de462616ce20c370da5c7659f0cb975 /net/core | |
parent | e7479122befd7026cf0fb3b3740f17ebd9c64d35 (diff) | |
download | linux-stable-b46f6ded906ef0be52a4881ba50a084aeca64d7e.tar.gz linux-stable-b46f6ded906ef0be52a4881ba50a084aeca64d7e.tar.bz2 linux-stable-b46f6ded906ef0be52a4881ba50a084aeca64d7e.zip |
libnl: nla_put_be64(): align on a 64-bit area
nla_data() is now aligned on a 64-bit area.
A temporary version (nla_put_be64_32bit()) is added for nla_put_net64().
This function is removed in the next patch.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/fib_rules.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index 365de66436ac..840acebbb80c 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c @@ -549,7 +549,7 @@ static inline size_t fib_rule_nlmsg_size(struct fib_rules_ops *ops, + nla_total_size(4) /* FRA_SUPPRESS_IFGROUP */ + nla_total_size(4) /* FRA_FWMARK */ + nla_total_size(4) /* FRA_FWMASK */ - + nla_total_size(8); /* FRA_TUN_ID */ + + nla_total_size_64bit(8); /* FRA_TUN_ID */ if (ops->nlmsg_payload) payload += ops->nlmsg_payload(rule); @@ -607,7 +607,7 @@ static int fib_nl_fill_rule(struct sk_buff *skb, struct fib_rule *rule, (rule->target && nla_put_u32(skb, FRA_GOTO, rule->target)) || (rule->tun_id && - nla_put_be64(skb, FRA_TUN_ID, rule->tun_id))) + nla_put_be64(skb, FRA_TUN_ID, rule->tun_id, FRA_PAD))) goto nla_put_failure; if (rule->suppress_ifgroup != -1) { |