diff options
author | Nicolas Dichtel <nicolas.dichtel@6wind.com> | 2016-04-21 12:58:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-21 14:22:13 -0400 |
commit | a9a080422ef7b0c7e69925e4a1474ad93f0f0117 (patch) | |
tree | 37af2215d50e78ed4fe3b4665790610dbdd3c839 | |
parent | 58414d32a37e4c2f79da91aebc2d2365918a1562 (diff) |
ipmr: align RTA_MFC_STATS on 64-bit
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/uapi/linux/rtnetlink.h | 1 | ||||
-rw-r--r-- | net/ipv4/ipmr.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h index cc885c4e9065..a94e0b69c769 100644 --- a/include/uapi/linux/rtnetlink.h +++ b/include/uapi/linux/rtnetlink.h | |||
@@ -317,6 +317,7 @@ enum rtattr_type_t { | |||
317 | RTA_ENCAP_TYPE, | 317 | RTA_ENCAP_TYPE, |
318 | RTA_ENCAP, | 318 | RTA_ENCAP, |
319 | RTA_EXPIRES, | 319 | RTA_EXPIRES, |
320 | RTA_PAD, | ||
320 | __RTA_MAX | 321 | __RTA_MAX |
321 | }; | 322 | }; |
322 | 323 | ||
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 395e2814a46d..21a38e296fe2 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -2104,7 +2104,7 @@ static int __ipmr_fill_mroute(struct mr_table *mrt, struct sk_buff *skb, | |||
2104 | mfcs.mfcs_packets = c->mfc_un.res.pkt; | 2104 | mfcs.mfcs_packets = c->mfc_un.res.pkt; |
2105 | mfcs.mfcs_bytes = c->mfc_un.res.bytes; | 2105 | mfcs.mfcs_bytes = c->mfc_un.res.bytes; |
2106 | mfcs.mfcs_wrong_if = c->mfc_un.res.wrong_if; | 2106 | mfcs.mfcs_wrong_if = c->mfc_un.res.wrong_if; |
2107 | if (nla_put(skb, RTA_MFC_STATS, sizeof(mfcs), &mfcs) < 0) | 2107 | if (nla_put_64bit(skb, RTA_MFC_STATS, sizeof(mfcs), &mfcs, RTA_PAD) < 0) |
2108 | return -EMSGSIZE; | 2108 | return -EMSGSIZE; |
2109 | 2109 | ||
2110 | rtm->rtm_type = RTN_MULTICAST; | 2110 | rtm->rtm_type = RTN_MULTICAST; |
@@ -2237,7 +2237,7 @@ static size_t mroute_msgsize(bool unresolved, int maxvif) | |||
2237 | + nla_total_size(0) /* RTA_MULTIPATH */ | 2237 | + nla_total_size(0) /* RTA_MULTIPATH */ |
2238 | + maxvif * NLA_ALIGN(sizeof(struct rtnexthop)) | 2238 | + maxvif * NLA_ALIGN(sizeof(struct rtnexthop)) |
2239 | /* RTA_MFC_STATS */ | 2239 | /* RTA_MFC_STATS */ |
2240 | + nla_total_size(sizeof(struct rta_mfc_stats)) | 2240 | + nla_total_size_64bit(sizeof(struct rta_mfc_stats)) |
2241 | ; | 2241 | ; |
2242 | 2242 | ||
2243 | return len; | 2243 | return len; |