提交 a9a08042 编写于 作者: N Nicolas Dichtel 提交者: David S. Miller

ipmr: align RTA_MFC_STATS on 64-bit

Signed-off-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 58414d32
...@@ -317,6 +317,7 @@ enum rtattr_type_t { ...@@ -317,6 +317,7 @@ enum rtattr_type_t {
RTA_ENCAP_TYPE, RTA_ENCAP_TYPE,
RTA_ENCAP, RTA_ENCAP,
RTA_EXPIRES, RTA_EXPIRES,
RTA_PAD,
__RTA_MAX __RTA_MAX
}; };
......
...@@ -2104,7 +2104,7 @@ static int __ipmr_fill_mroute(struct mr_table *mrt, struct sk_buff *skb, ...@@ -2104,7 +2104,7 @@ static int __ipmr_fill_mroute(struct mr_table *mrt, struct sk_buff *skb,
mfcs.mfcs_packets = c->mfc_un.res.pkt; mfcs.mfcs_packets = c->mfc_un.res.pkt;
mfcs.mfcs_bytes = c->mfc_un.res.bytes; mfcs.mfcs_bytes = c->mfc_un.res.bytes;
mfcs.mfcs_wrong_if = c->mfc_un.res.wrong_if; mfcs.mfcs_wrong_if = c->mfc_un.res.wrong_if;
if (nla_put(skb, RTA_MFC_STATS, sizeof(mfcs), &mfcs) < 0) if (nla_put_64bit(skb, RTA_MFC_STATS, sizeof(mfcs), &mfcs, RTA_PAD) < 0)
return -EMSGSIZE; return -EMSGSIZE;
rtm->rtm_type = RTN_MULTICAST; rtm->rtm_type = RTN_MULTICAST;
...@@ -2237,7 +2237,7 @@ static size_t mroute_msgsize(bool unresolved, int maxvif) ...@@ -2237,7 +2237,7 @@ static size_t mroute_msgsize(bool unresolved, int maxvif)
+ nla_total_size(0) /* RTA_MULTIPATH */ + nla_total_size(0) /* RTA_MULTIPATH */
+ maxvif * NLA_ALIGN(sizeof(struct rtnexthop)) + maxvif * NLA_ALIGN(sizeof(struct rtnexthop))
/* RTA_MFC_STATS */ /* RTA_MFC_STATS */
+ nla_total_size(sizeof(struct rta_mfc_stats)) + nla_total_size_64bit(sizeof(struct rta_mfc_stats))
; ;
return len; return len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册