diff options
author | Nicolas Dichtel | 2016-04-22 17:31:18 +0200 |
---|---|---|
committer | David S. Miller | 2016-04-24 02:13:24 +0200 |
commit | b46f6ded906ef0be52a4881ba50a084aeca64d7e (patch) | |
tree | b17273779de462616ce20c370da5c7659f0cb975 /net/netfilter/nft_limit.c | |
parent | libnl: nla_put_le64(): align on a 64-bit area (diff) | |
download | kernel-qcow2-linux-b46f6ded906ef0be52a4881ba50a084aeca64d7e.tar.gz kernel-qcow2-linux-b46f6ded906ef0be52a4881ba50a084aeca64d7e.tar.xz kernel-qcow2-linux-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/netfilter/nft_limit.c')
-rw-r--r-- | net/netfilter/nft_limit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/netfilter/nft_limit.c b/net/netfilter/nft_limit.c index 99d18578afc6..070b98938e02 100644 --- a/net/netfilter/nft_limit.c +++ b/net/netfilter/nft_limit.c @@ -97,8 +97,10 @@ static int nft_limit_dump(struct sk_buff *skb, const struct nft_limit *limit, u64 secs = div_u64(limit->nsecs, NSEC_PER_SEC); u64 rate = limit->rate - limit->burst; - if (nla_put_be64(skb, NFTA_LIMIT_RATE, cpu_to_be64(rate)) || - nla_put_be64(skb, NFTA_LIMIT_UNIT, cpu_to_be64(secs)) || + if (nla_put_be64(skb, NFTA_LIMIT_RATE, cpu_to_be64(rate), + NFTA_LIMIT_PAD) || + nla_put_be64(skb, NFTA_LIMIT_UNIT, cpu_to_be64(secs), + NFTA_LIMIT_PAD) || nla_put_be32(skb, NFTA_LIMIT_BURST, htonl(limit->burst)) || nla_put_be32(skb, NFTA_LIMIT_TYPE, htonl(type)) || nla_put_be32(skb, NFTA_LIMIT_FLAGS, htonl(flags))) |