diff options
-rw-r--r-- | include/linux/nl802154.h | 2 | ||||
-rw-r--r-- | include/uapi/linux/if_link.h | 3 | ||||
-rw-r--r-- | include/uapi/linux/ila.h | 1 | ||||
-rw-r--r-- | include/uapi/linux/ip_vs.h | 1 | ||||
-rw-r--r-- | include/uapi/linux/l2tp.h | 1 | ||||
-rw-r--r-- | include/uapi/linux/nl80211.h | 4 | ||||
-rw-r--r-- | include/uapi/linux/openvswitch.h | 1 | ||||
-rw-r--r-- | include/uapi/linux/pkt_sched.h | 3 | ||||
-rw-r--r-- | net/bridge/br_netlink.c | 62 | ||||
-rw-r--r-- | net/core/rtnetlink.c | 36 | ||||
-rw-r--r-- | net/ieee802154/nl-mac.c | 17 | ||||
-rw-r--r-- | net/ieee802154/nl802154.c | 3 | ||||
-rw-r--r-- | net/ipv6/ila/ila_lwt.c | 3 | ||||
-rw-r--r-- | net/ipv6/ila/ila_xlat.c | 15 | ||||
-rw-r--r-- | net/l2tp/l2tp_netlink.c | 80 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_ctl.c | 36 | ||||
-rw-r--r-- | net/openvswitch/datapath.c | 3 | ||||
-rw-r--r-- | net/sched/sch_htb.c | 6 | ||||
-rw-r--r-- | net/sched/sch_netem.c | 3 | ||||
-rw-r--r-- | net/sched/sch_tbf.c | 6 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 91 |
21 files changed, 233 insertions, 144 deletions
diff --git a/include/linux/nl802154.h b/include/linux/nl802154.h index 167342c2ce6b..0f6f6607f592 100644 --- a/include/linux/nl802154.h +++ b/include/linux/nl802154.h | |||
@@ -92,6 +92,8 @@ enum { | |||
92 | IEEE802154_ATTR_LLSEC_DEV_OVERRIDE, | 92 | IEEE802154_ATTR_LLSEC_DEV_OVERRIDE, |
93 | IEEE802154_ATTR_LLSEC_DEV_KEY_MODE, | 93 | IEEE802154_ATTR_LLSEC_DEV_KEY_MODE, |
94 | 94 | ||
95 | IEEE802154_ATTR_PAD, | ||
96 | |||
95 | __IEEE802154_ATTR_MAX, | 97 | __IEEE802154_ATTR_MAX, |
96 | }; | 98 | }; |
97 | 99 | ||
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h index ba69d4447249..9300c08346c8 100644 --- a/include/uapi/linux/if_link.h +++ b/include/uapi/linux/if_link.h | |||
@@ -271,6 +271,7 @@ enum { | |||
271 | IFLA_BR_NF_CALL_IP6TABLES, | 271 | IFLA_BR_NF_CALL_IP6TABLES, |
272 | IFLA_BR_NF_CALL_ARPTABLES, | 272 | IFLA_BR_NF_CALL_ARPTABLES, |
273 | IFLA_BR_VLAN_DEFAULT_PVID, | 273 | IFLA_BR_VLAN_DEFAULT_PVID, |
274 | IFLA_BR_PAD, | ||
274 | __IFLA_BR_MAX, | 275 | __IFLA_BR_MAX, |
275 | }; | 276 | }; |
276 | 277 | ||
@@ -313,6 +314,7 @@ enum { | |||
313 | IFLA_BRPORT_HOLD_TIMER, | 314 | IFLA_BRPORT_HOLD_TIMER, |
314 | IFLA_BRPORT_FLUSH, | 315 | IFLA_BRPORT_FLUSH, |
315 | IFLA_BRPORT_MULTICAST_ROUTER, | 316 | IFLA_BRPORT_MULTICAST_ROUTER, |
317 | IFLA_BRPORT_PAD, | ||
316 | __IFLA_BRPORT_MAX | 318 | __IFLA_BRPORT_MAX |
317 | }; | 319 | }; |
318 | #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1) | 320 | #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1) |
@@ -666,6 +668,7 @@ enum { | |||
666 | IFLA_VF_STATS_TX_BYTES, | 668 | IFLA_VF_STATS_TX_BYTES, |
667 | IFLA_VF_STATS_BROADCAST, | 669 | IFLA_VF_STATS_BROADCAST, |
668 | IFLA_VF_STATS_MULTICAST, | 670 | IFLA_VF_STATS_MULTICAST, |
671 | IFLA_VF_STATS_PAD, | ||
669 | __IFLA_VF_STATS_MAX, | 672 | __IFLA_VF_STATS_MAX, |
670 | }; | 673 | }; |
671 | 674 | ||
diff --git a/include/uapi/linux/ila.h b/include/uapi/linux/ila.h index abde7bbd6f3b..cd97951680bf 100644 --- a/include/uapi/linux/ila.h +++ b/include/uapi/linux/ila.h | |||
@@ -14,6 +14,7 @@ enum { | |||
14 | ILA_ATTR_LOCATOR_MATCH, /* u64 */ | 14 | ILA_ATTR_LOCATOR_MATCH, /* u64 */ |
15 | ILA_ATTR_IFINDEX, /* s32 */ | 15 | ILA_ATTR_IFINDEX, /* s32 */ |
16 | ILA_ATTR_DIR, /* u32 */ | 16 | ILA_ATTR_DIR, /* u32 */ |
17 | ILA_ATTR_PAD, | ||
17 | 18 | ||
18 | __ILA_ATTR_MAX, | 19 | __ILA_ATTR_MAX, |
19 | }; | 20 | }; |
diff --git a/include/uapi/linux/ip_vs.h b/include/uapi/linux/ip_vs.h index 391395c06c7e..22d69894bc92 100644 --- a/include/uapi/linux/ip_vs.h +++ b/include/uapi/linux/ip_vs.h | |||
@@ -435,6 +435,7 @@ enum { | |||
435 | IPVS_STATS_ATTR_OUTPPS, /* current out packet rate */ | 435 | IPVS_STATS_ATTR_OUTPPS, /* current out packet rate */ |
436 | IPVS_STATS_ATTR_INBPS, /* current in byte rate */ | 436 | IPVS_STATS_ATTR_INBPS, /* current in byte rate */ |
437 | IPVS_STATS_ATTR_OUTBPS, /* current out byte rate */ | 437 | IPVS_STATS_ATTR_OUTBPS, /* current out byte rate */ |
438 | IPVS_STATS_ATTR_PAD, | ||
438 | __IPVS_STATS_ATTR_MAX, | 439 | __IPVS_STATS_ATTR_MAX, |
439 | }; | 440 | }; |
440 | 441 | ||
diff --git a/include/uapi/linux/l2tp.h b/include/uapi/linux/l2tp.h index 3386a99e0397..4bd27d0270a2 100644 --- a/include/uapi/linux/l2tp.h +++ b/include/uapi/linux/l2tp.h | |||
@@ -143,6 +143,7 @@ enum { | |||
143 | L2TP_ATTR_RX_SEQ_DISCARDS, /* u64 */ | 143 | L2TP_ATTR_RX_SEQ_DISCARDS, /* u64 */ |
144 | L2TP_ATTR_RX_OOS_PACKETS, /* u64 */ | 144 | L2TP_ATTR_RX_OOS_PACKETS, /* u64 */ |
145 | L2TP_ATTR_RX_ERRORS, /* u64 */ | 145 | L2TP_ATTR_RX_ERRORS, /* u64 */ |
146 | L2TP_ATTR_STATS_PAD, | ||
146 | __L2TP_ATTR_STATS_MAX, | 147 | __L2TP_ATTR_STATS_MAX, |
147 | }; | 148 | }; |
148 | 149 | ||
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 1df655d8aa52..2c55dd1894c3 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h | |||
@@ -2197,6 +2197,8 @@ enum nl80211_attrs { | |||
2197 | 2197 | ||
2198 | NL80211_ATTR_STA_SUPPORT_P2P_PS, | 2198 | NL80211_ATTR_STA_SUPPORT_P2P_PS, |
2199 | 2199 | ||
2200 | NL80211_ATTR_PAD, | ||
2201 | |||
2200 | /* add attributes here, update the policy in nl80211.c */ | 2202 | /* add attributes here, update the policy in nl80211.c */ |
2201 | 2203 | ||
2202 | __NL80211_ATTR_AFTER_LAST, | 2204 | __NL80211_ATTR_AFTER_LAST, |
@@ -3023,6 +3025,7 @@ enum nl80211_survey_info { | |||
3023 | NL80211_SURVEY_INFO_TIME_RX, | 3025 | NL80211_SURVEY_INFO_TIME_RX, |
3024 | NL80211_SURVEY_INFO_TIME_TX, | 3026 | NL80211_SURVEY_INFO_TIME_TX, |
3025 | NL80211_SURVEY_INFO_TIME_SCAN, | 3027 | NL80211_SURVEY_INFO_TIME_SCAN, |
3028 | NL80211_SURVEY_INFO_PAD, | ||
3026 | 3029 | ||
3027 | /* keep last */ | 3030 | /* keep last */ |
3028 | __NL80211_SURVEY_INFO_AFTER_LAST, | 3031 | __NL80211_SURVEY_INFO_AFTER_LAST, |
@@ -3468,6 +3471,7 @@ enum nl80211_bss { | |||
3468 | NL80211_BSS_BEACON_TSF, | 3471 | NL80211_BSS_BEACON_TSF, |
3469 | NL80211_BSS_PRESP_DATA, | 3472 | NL80211_BSS_PRESP_DATA, |
3470 | NL80211_BSS_LAST_SEEN_BOOTTIME, | 3473 | NL80211_BSS_LAST_SEEN_BOOTTIME, |
3474 | NL80211_BSS_PAD, | ||
3471 | 3475 | ||
3472 | /* keep last */ | 3476 | /* keep last */ |
3473 | __NL80211_BSS_AFTER_LAST, | 3477 | __NL80211_BSS_AFTER_LAST, |
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h index 0358f94af86e..d6be1fb778a5 100644 --- a/include/uapi/linux/openvswitch.h +++ b/include/uapi/linux/openvswitch.h | |||
@@ -519,6 +519,7 @@ enum ovs_flow_attr { | |||
519 | * logging should be suppressed. */ | 519 | * logging should be suppressed. */ |
520 | OVS_FLOW_ATTR_UFID, /* Variable length unique flow identifier. */ | 520 | OVS_FLOW_ATTR_UFID, /* Variable length unique flow identifier. */ |
521 | OVS_FLOW_ATTR_UFID_FLAGS,/* u32 of OVS_UFID_F_*. */ | 521 | OVS_FLOW_ATTR_UFID_FLAGS,/* u32 of OVS_UFID_F_*. */ |
522 | OVS_FLOW_ATTR_PAD, | ||
522 | __OVS_FLOW_ATTR_MAX | 523 | __OVS_FLOW_ATTR_MAX |
523 | }; | 524 | }; |
524 | 525 | ||
diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h index 8cb18b44968e..1c78c7454c7c 100644 --- a/include/uapi/linux/pkt_sched.h +++ b/include/uapi/linux/pkt_sched.h | |||
@@ -179,6 +179,7 @@ enum { | |||
179 | TCA_TBF_PRATE64, | 179 | TCA_TBF_PRATE64, |
180 | TCA_TBF_BURST, | 180 | TCA_TBF_BURST, |
181 | TCA_TBF_PBURST, | 181 | TCA_TBF_PBURST, |
182 | TCA_TBF_PAD, | ||
182 | __TCA_TBF_MAX, | 183 | __TCA_TBF_MAX, |
183 | }; | 184 | }; |
184 | 185 | ||
@@ -368,6 +369,7 @@ enum { | |||
368 | TCA_HTB_DIRECT_QLEN, | 369 | TCA_HTB_DIRECT_QLEN, |
369 | TCA_HTB_RATE64, | 370 | TCA_HTB_RATE64, |
370 | TCA_HTB_CEIL64, | 371 | TCA_HTB_CEIL64, |
372 | TCA_HTB_PAD, | ||
371 | __TCA_HTB_MAX, | 373 | __TCA_HTB_MAX, |
372 | }; | 374 | }; |
373 | 375 | ||
@@ -531,6 +533,7 @@ enum { | |||
531 | TCA_NETEM_RATE, | 533 | TCA_NETEM_RATE, |
532 | TCA_NETEM_ECN, | 534 | TCA_NETEM_ECN, |
533 | TCA_NETEM_RATE64, | 535 | TCA_NETEM_RATE64, |
536 | TCA_NETEM_PAD, | ||
534 | __TCA_NETEM_MAX, | 537 | __TCA_NETEM_MAX, |
535 | }; | 538 | }; |
536 | 539 | ||
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index e9c635eae24d..6bae1125e36d 100644 --- a/net/bridge/br_netlink.c +++ b/net/bridge/br_netlink.c | |||
@@ -135,9 +135,9 @@ static inline size_t br_port_info_size(void) | |||
135 | + nla_total_size(sizeof(u16)) /* IFLA_BRPORT_NO */ | 135 | + nla_total_size(sizeof(u16)) /* IFLA_BRPORT_NO */ |
136 | + nla_total_size(sizeof(u8)) /* IFLA_BRPORT_TOPOLOGY_CHANGE_ACK */ | 136 | + nla_total_size(sizeof(u8)) /* IFLA_BRPORT_TOPOLOGY_CHANGE_ACK */ |
137 | + nla_total_size(sizeof(u8)) /* IFLA_BRPORT_CONFIG_PENDING */ | 137 | + nla_total_size(sizeof(u8)) /* IFLA_BRPORT_CONFIG_PENDING */ |
138 | + nla_total_size(sizeof(u64)) /* IFLA_BRPORT_MESSAGE_AGE_TIMER */ | 138 | + nla_total_size_64bit(sizeof(u64)) /* IFLA_BRPORT_MESSAGE_AGE_TIMER */ |
139 | + nla_total_size(sizeof(u64)) /* IFLA_BRPORT_FORWARD_DELAY_TIMER */ | 139 | + nla_total_size_64bit(sizeof(u64)) /* IFLA_BRPORT_FORWARD_DELAY_TIMER */ |
140 | + nla_total_size(sizeof(u64)) /* IFLA_BRPORT_HOLD_TIMER */ | 140 | + nla_total_size_64bit(sizeof(u64)) /* IFLA_BRPORT_HOLD_TIMER */ |
141 | #ifdef CONFIG_BRIDGE_IGMP_SNOOPING | 141 | #ifdef CONFIG_BRIDGE_IGMP_SNOOPING |
142 | + nla_total_size(sizeof(u8)) /* IFLA_BRPORT_MULTICAST_ROUTER */ | 142 | + nla_total_size(sizeof(u8)) /* IFLA_BRPORT_MULTICAST_ROUTER */ |
143 | #endif | 143 | #endif |
@@ -190,13 +190,16 @@ static int br_port_fill_attrs(struct sk_buff *skb, | |||
190 | return -EMSGSIZE; | 190 | return -EMSGSIZE; |
191 | 191 | ||
192 | timerval = br_timer_value(&p->message_age_timer); | 192 | timerval = br_timer_value(&p->message_age_timer); |
193 | if (nla_put_u64(skb, IFLA_BRPORT_MESSAGE_AGE_TIMER, timerval)) | 193 | if (nla_put_u64_64bit(skb, IFLA_BRPORT_MESSAGE_AGE_TIMER, timerval, |
194 | IFLA_BRPORT_PAD)) | ||
194 | return -EMSGSIZE; | 195 | return -EMSGSIZE; |
195 | timerval = br_timer_value(&p->forward_delay_timer); | 196 | timerval = br_timer_value(&p->forward_delay_timer); |
196 | if (nla_put_u64(skb, IFLA_BRPORT_FORWARD_DELAY_TIMER, timerval)) | 197 | if (nla_put_u64_64bit(skb, IFLA_BRPORT_FORWARD_DELAY_TIMER, timerval, |
198 | IFLA_BRPORT_PAD)) | ||
197 | return -EMSGSIZE; | 199 | return -EMSGSIZE; |
198 | timerval = br_timer_value(&p->hold_timer); | 200 | timerval = br_timer_value(&p->hold_timer); |
199 | if (nla_put_u64(skb, IFLA_BRPORT_HOLD_TIMER, timerval)) | 201 | if (nla_put_u64_64bit(skb, IFLA_BRPORT_HOLD_TIMER, timerval, |
202 | IFLA_BRPORT_PAD)) | ||
200 | return -EMSGSIZE; | 203 | return -EMSGSIZE; |
201 | 204 | ||
202 | #ifdef CONFIG_BRIDGE_IGMP_SNOOPING | 205 | #ifdef CONFIG_BRIDGE_IGMP_SNOOPING |
@@ -1087,10 +1090,10 @@ static size_t br_get_size(const struct net_device *brdev) | |||
1087 | nla_total_size(sizeof(u32)) + /* IFLA_BR_ROOT_PATH_COST */ | 1090 | nla_total_size(sizeof(u32)) + /* IFLA_BR_ROOT_PATH_COST */ |
1088 | nla_total_size(sizeof(u8)) + /* IFLA_BR_TOPOLOGY_CHANGE */ | 1091 | nla_total_size(sizeof(u8)) + /* IFLA_BR_TOPOLOGY_CHANGE */ |
1089 | nla_total_size(sizeof(u8)) + /* IFLA_BR_TOPOLOGY_CHANGE_DETECTED */ | 1092 | nla_total_size(sizeof(u8)) + /* IFLA_BR_TOPOLOGY_CHANGE_DETECTED */ |
1090 | nla_total_size(sizeof(u64)) + /* IFLA_BR_HELLO_TIMER */ | 1093 | nla_total_size_64bit(sizeof(u64)) + /* IFLA_BR_HELLO_TIMER */ |
1091 | nla_total_size(sizeof(u64)) + /* IFLA_BR_TCN_TIMER */ | 1094 | nla_total_size_64bit(sizeof(u64)) + /* IFLA_BR_TCN_TIMER */ |
1092 | nla_total_size(sizeof(u64)) + /* IFLA_BR_TOPOLOGY_CHANGE_TIMER */ | 1095 | nla_total_size_64bit(sizeof(u64)) + /* IFLA_BR_TOPOLOGY_CHANGE_TIMER */ |
1093 | nla_total_size(sizeof(u64)) + /* IFLA_BR_GC_TIMER */ | 1096 | nla_total_size_64bit(sizeof(u64)) + /* IFLA_BR_GC_TIMER */ |
1094 | nla_total_size(ETH_ALEN) + /* IFLA_BR_GROUP_ADDR */ | 1097 | nla_total_size(ETH_ALEN) + /* IFLA_BR_GROUP_ADDR */ |
1095 | #ifdef CONFIG_BRIDGE_IGMP_SNOOPING | 1098 | #ifdef CONFIG_BRIDGE_IGMP_SNOOPING |
1096 | nla_total_size(sizeof(u8)) + /* IFLA_BR_MCAST_ROUTER */ | 1099 | nla_total_size(sizeof(u8)) + /* IFLA_BR_MCAST_ROUTER */ |
@@ -1101,12 +1104,12 @@ static size_t br_get_size(const struct net_device *brdev) | |||
1101 | nla_total_size(sizeof(u32)) + /* IFLA_BR_MCAST_HASH_MAX */ | 1104 | nla_total_size(sizeof(u32)) + /* IFLA_BR_MCAST_HASH_MAX */ |
1102 | nla_total_size(sizeof(u32)) + /* IFLA_BR_MCAST_LAST_MEMBER_CNT */ | 1105 | nla_total_size(sizeof(u32)) + /* IFLA_BR_MCAST_LAST_MEMBER_CNT */ |
1103 | nla_total_size(sizeof(u32)) + /* IFLA_BR_MCAST_STARTUP_QUERY_CNT */ | 1106 | nla_total_size(sizeof(u32)) + /* IFLA_BR_MCAST_STARTUP_QUERY_CNT */ |
1104 | nla_total_size(sizeof(u64)) + /* IFLA_BR_MCAST_LAST_MEMBER_INTVL */ | 1107 | nla_total_size_64bit(sizeof(u64)) + /* IFLA_BR_MCAST_LAST_MEMBER_INTVL */ |
1105 | nla_total_size(sizeof(u64)) + /* IFLA_BR_MCAST_MEMBERSHIP_INTVL */ | 1108 | nla_total_size_64bit(sizeof(u64)) + /* IFLA_BR_MCAST_MEMBERSHIP_INTVL */ |
1106 | nla_total_size(sizeof(u64)) + /* IFLA_BR_MCAST_QUERIER_INTVL */ | 1109 | nla_total_size_64bit(sizeof(u64)) + /* IFLA_BR_MCAST_QUERIER_INTVL */ |
1107 | nla_total_size(sizeof(u64)) + /* IFLA_BR_MCAST_QUERY_INTVL */ | 1110 | nla_total_size_64bit(sizeof(u64)) + /* IFLA_BR_MCAST_QUERY_INTVL */ |
1108 | nla_total_size(sizeof(u64)) + /* IFLA_BR_MCAST_QUERY_RESPONSE_INTVL */ | 1111 | nla_total_size_64bit(sizeof(u64)) + /* IFLA_BR_MCAST_QUERY_RESPONSE_INTVL */ |
1109 | nla_total_size(sizeof(u64)) + /* IFLA_BR_MCAST_STARTUP_QUERY_INTVL */ | 1112 | nla_total_size_64bit(sizeof(u64)) + /* IFLA_BR_MCAST_STARTUP_QUERY_INTVL */ |
1110 | #endif | 1113 | #endif |
1111 | #if IS_ENABLED(CONFIG_BRIDGE_NETFILTER) | 1114 | #if IS_ENABLED(CONFIG_BRIDGE_NETFILTER) |
1112 | nla_total_size(sizeof(u8)) + /* IFLA_BR_NF_CALL_IPTABLES */ | 1115 | nla_total_size(sizeof(u8)) + /* IFLA_BR_NF_CALL_IPTABLES */ |
@@ -1129,16 +1132,17 @@ static int br_fill_info(struct sk_buff *skb, const struct net_device *brdev) | |||
1129 | u64 clockval; | 1132 | u64 clockval; |
1130 | 1133 | ||
1131 | clockval = br_timer_value(&br->hello_timer); | 1134 | clockval = br_timer_value(&br->hello_timer); |
1132 | if (nla_put_u64(skb, IFLA_BR_HELLO_TIMER, clockval)) | 1135 | if (nla_put_u64_64bit(skb, IFLA_BR_HELLO_TIMER, clockval, IFLA_BR_PAD)) |
1133 | return -EMSGSIZE; | 1136 | return -EMSGSIZE; |
1134 | clockval = br_timer_value(&br->tcn_timer); | 1137 | clockval = br_timer_value(&br->tcn_timer); |
1135 | if (nla_put_u64(skb, IFLA_BR_TCN_TIMER, clockval)) | 1138 | if (nla_put_u64_64bit(skb, IFLA_BR_TCN_TIMER, clockval, IFLA_BR_PAD)) |
1136 | return -EMSGSIZE; | 1139 | return -EMSGSIZE; |
1137 | clockval = br_timer_value(&br->topology_change_timer); | 1140 | clockval = br_timer_value(&br->topology_change_timer); |
1138 | if (nla_put_u64(skb, IFLA_BR_TOPOLOGY_CHANGE_TIMER, clockval)) | 1141 | if (nla_put_u64_64bit(skb, IFLA_BR_TOPOLOGY_CHANGE_TIMER, clockval, |
1142 | IFLA_BR_PAD)) | ||
1139 | return -EMSGSIZE; | 1143 | return -EMSGSIZE; |
1140 | clockval = br_timer_value(&br->gc_timer); | 1144 | clockval = br_timer_value(&br->gc_timer); |
1141 | if (nla_put_u64(skb, IFLA_BR_GC_TIMER, clockval)) | 1145 | if (nla_put_u64_64bit(skb, IFLA_BR_GC_TIMER, clockval, IFLA_BR_PAD)) |
1142 | return -EMSGSIZE; | 1146 | return -EMSGSIZE; |
1143 | 1147 | ||
1144 | if (nla_put_u32(skb, IFLA_BR_FORWARD_DELAY, forward_delay) || | 1148 | if (nla_put_u32(skb, IFLA_BR_FORWARD_DELAY, forward_delay) || |
@@ -1182,22 +1186,28 @@ static int br_fill_info(struct sk_buff *skb, const struct net_device *brdev) | |||
1182 | return -EMSGSIZE; | 1186 | return -EMSGSIZE; |
1183 | 1187 | ||
1184 | clockval = jiffies_to_clock_t(br->multicast_last_member_interval); | 1188 | clockval = jiffies_to_clock_t(br->multicast_last_member_interval); |
1185 | if (nla_put_u64(skb, IFLA_BR_MCAST_LAST_MEMBER_INTVL, clockval)) | 1189 | if (nla_put_u64_64bit(skb, IFLA_BR_MCAST_LAST_MEMBER_INTVL, clockval, |
1190 | IFLA_BR_PAD)) | ||
1186 | return -EMSGSIZE; | 1191 | return -EMSGSIZE; |
1187 | clockval = jiffies_to_clock_t(br->multicast_membership_interval); | 1192 | clockval = jiffies_to_clock_t(br->multicast_membership_interval); |
1188 | if (nla_put_u64(skb, IFLA_BR_MCAST_MEMBERSHIP_INTVL, clockval)) | 1193 | if (nla_put_u64_64bit(skb, IFLA_BR_MCAST_MEMBERSHIP_INTVL, clockval, |
1194 | IFLA_BR_PAD)) | ||
1189 | return -EMSGSIZE; | 1195 | return -EMSGSIZE; |
1190 | clockval = jiffies_to_clock_t(br->multicast_querier_interval); | 1196 | clockval = jiffies_to_clock_t(br->multicast_querier_interval); |
1191 | if (nla_put_u64(skb, IFLA_BR_MCAST_QUERIER_INTVL, clockval)) | 1197 | if (nla_put_u64_64bit(skb, IFLA_BR_MCAST_QUERIER_INTVL, clockval, |
1198 | IFLA_BR_PAD)) | ||
1192 | return -EMSGSIZE; | 1199 | return -EMSGSIZE; |
1193 | clockval = jiffies_to_clock_t(br->multicast_query_interval); | 1200 | clockval = jiffies_to_clock_t(br->multicast_query_interval); |
1194 | if (nla_put_u64(skb, IFLA_BR_MCAST_QUERY_INTVL, clockval)) | 1201 | if (nla_put_u64_64bit(skb, IFLA_BR_MCAST_QUERY_INTVL, clockval, |
1202 | IFLA_BR_PAD)) | ||
1195 | return -EMSGSIZE; | 1203 | return -EMSGSIZE; |
1196 | clockval = jiffies_to_clock_t(br->multicast_query_response_interval); | 1204 | clockval = jiffies_to_clock_t(br->multicast_query_response_interval); |
1197 | if (nla_put_u64(skb, IFLA_BR_MCAST_QUERY_RESPONSE_INTVL, clockval)) | 1205 | if (nla_put_u64_64bit(skb, IFLA_BR_MCAST_QUERY_RESPONSE_INTVL, clockval, |
1206 | IFLA_BR_PAD)) | ||
1198 | return -EMSGSIZE; | 1207 | return -EMSGSIZE; |
1199 | clockval = jiffies_to_clock_t(br->multicast_startup_query_interval); | 1208 | clockval = jiffies_to_clock_t(br->multicast_startup_query_interval); |
1200 | if (nla_put_u64(skb, IFLA_BR_MCAST_STARTUP_QUERY_INTVL, clockval)) | 1209 | if (nla_put_u64_64bit(skb, IFLA_BR_MCAST_STARTUP_QUERY_INTVL, clockval, |
1210 | IFLA_BR_PAD)) | ||
1201 | return -EMSGSIZE; | 1211 | return -EMSGSIZE; |
1202 | #endif | 1212 | #endif |
1203 | #if IS_ENABLED(CONFIG_BRIDGE_NETFILTER) | 1213 | #if IS_ENABLED(CONFIG_BRIDGE_NETFILTER) |
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 5ec059d52823..9efc1f34ef3b 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -825,17 +825,17 @@ static inline int rtnl_vfinfo_size(const struct net_device *dev, | |||
825 | nla_total_size(sizeof(struct ifla_vf_link_state)) + | 825 | nla_total_size(sizeof(struct ifla_vf_link_state)) + |
826 | nla_total_size(sizeof(struct ifla_vf_rss_query_en)) + | 826 | nla_total_size(sizeof(struct ifla_vf_rss_query_en)) + |
827 | /* IFLA_VF_STATS_RX_PACKETS */ | 827 | /* IFLA_VF_STATS_RX_PACKETS */ |
828 | nla_total_size(sizeof(__u64)) + | 828 | nla_total_size_64bit(sizeof(__u64)) + |
829 | /* IFLA_VF_STATS_TX_PACKETS */ | 829 | /* IFLA_VF_STATS_TX_PACKETS */ |
830 | nla_total_size(sizeof(__u64)) + | 830 | nla_total_size_64bit(sizeof(__u64)) + |
831 | /* IFLA_VF_STATS_RX_BYTES */ | 831 | /* IFLA_VF_STATS_RX_BYTES */ |
832 | nla_total_size(sizeof(__u64)) + | 832 | nla_total_size_64bit(sizeof(__u64)) + |
833 | /* IFLA_VF_STATS_TX_BYTES */ | 833 | /* IFLA_VF_STATS_TX_BYTES */ |
834 | nla_total_size(sizeof(__u64)) + | 834 | nla_total_size_64bit(sizeof(__u64)) + |
835 | /* IFLA_VF_STATS_BROADCAST */ | 835 | /* IFLA_VF_STATS_BROADCAST */ |
836 | nla_total_size(sizeof(__u64)) + | 836 | nla_total_size_64bit(sizeof(__u64)) + |
837 | /* IFLA_VF_STATS_MULTICAST */ | 837 | /* IFLA_VF_STATS_MULTICAST */ |
838 | nla_total_size(sizeof(__u64)) + | 838 | nla_total_size_64bit(sizeof(__u64)) + |
839 | nla_total_size(sizeof(struct ifla_vf_trust))); | 839 | nla_total_size(sizeof(struct ifla_vf_trust))); |
840 | return size; | 840 | return size; |
841 | } else | 841 | } else |
@@ -1153,18 +1153,18 @@ static noinline_for_stack int rtnl_fill_vfinfo(struct sk_buff *skb, | |||
1153 | nla_nest_cancel(skb, vfinfo); | 1153 | nla_nest_cancel(skb, vfinfo); |
1154 | return -EMSGSIZE; | 1154 | return -EMSGSIZE; |
1155 | } | 1155 | } |
1156 | if (nla_put_u64(skb, IFLA_VF_STATS_RX_PACKETS, | 1156 | if (nla_put_u64_64bit(skb, IFLA_VF_STATS_RX_PACKETS, |
1157 | vf_stats.rx_packets) || | 1157 | vf_stats.rx_packets, IFLA_VF_STATS_PAD) || |
1158 | nla_put_u64(skb, IFLA_VF_STATS_TX_PACKETS, | 1158 | nla_put_u64_64bit(skb, IFLA_VF_STATS_TX_PACKETS, |
1159 | vf_stats.tx_packets) || | 1159 | vf_stats.tx_packets, IFLA_VF_STATS_PAD) || |
1160 | nla_put_u64(skb, IFLA_VF_STATS_RX_BYTES, | 1160 | nla_put_u64_64bit(skb, IFLA_VF_STATS_RX_BYTES, |
1161 | vf_stats.rx_bytes) || | 1161 | vf_stats.rx_bytes, IFLA_VF_STATS_PAD) || |
1162 | nla_put_u64(skb, IFLA_VF_STATS_TX_BYTES, | 1162 | nla_put_u64_64bit(skb, IFLA_VF_STATS_TX_BYTES, |
1163 | vf_stats.tx_bytes) || | 1163 | vf_stats.tx_bytes, IFLA_VF_STATS_PAD) || |
1164 | nla_put_u64(skb, IFLA_VF_STATS_BROADCAST, | 1164 | nla_put_u64_64bit(skb, IFLA_VF_STATS_BROADCAST, |
1165 | vf_stats.broadcast) || | 1165 | vf_stats.broadcast, IFLA_VF_STATS_PAD) || |
1166 | nla_put_u64(skb, IFLA_VF_STATS_MULTICAST, | 1166 | nla_put_u64_64bit(skb, IFLA_VF_STATS_MULTICAST, |
1167 | vf_stats.multicast)) | 1167 | vf_stats.multicast, IFLA_VF_STATS_PAD)) |
1168 | return -EMSGSIZE; | 1168 | return -EMSGSIZE; |
1169 | nla_nest_end(skb, vfstats); | 1169 | nla_nest_end(skb, vfstats); |
1170 | nla_nest_end(skb, vf); | 1170 | nla_nest_end(skb, vf); |
diff --git a/net/ieee802154/nl-mac.c b/net/ieee802154/nl-mac.c index 3503c38954f9..d3cbb3258718 100644 --- a/net/ieee802154/nl-mac.c +++ b/net/ieee802154/nl-mac.c | |||
@@ -34,9 +34,11 @@ | |||
34 | 34 | ||
35 | #include "ieee802154.h" | 35 | #include "ieee802154.h" |
36 | 36 | ||
37 | static int nla_put_hwaddr(struct sk_buff *msg, int type, __le64 hwaddr) | 37 | static int nla_put_hwaddr(struct sk_buff *msg, int type, __le64 hwaddr, |
38 | int padattr) | ||
38 | { | 39 | { |
39 | return nla_put_u64(msg, type, swab64((__force u64)hwaddr)); | 40 | return nla_put_u64_64bit(msg, type, swab64((__force u64)hwaddr), |
41 | padattr); | ||
40 | } | 42 | } |
41 | 43 | ||
42 | static __le64 nla_get_hwaddr(const struct nlattr *nla) | 44 | static __le64 nla_get_hwaddr(const struct nlattr *nla) |
@@ -623,7 +625,8 @@ ieee802154_llsec_fill_key_id(struct sk_buff *msg, | |||
623 | 625 | ||
624 | if (desc->device_addr.mode == IEEE802154_ADDR_LONG && | 626 | if (desc->device_addr.mode == IEEE802154_ADDR_LONG && |
625 | nla_put_hwaddr(msg, IEEE802154_ATTR_HW_ADDR, | 627 | nla_put_hwaddr(msg, IEEE802154_ATTR_HW_ADDR, |
626 | desc->device_addr.extended_addr)) | 628 | desc->device_addr.extended_addr, |
629 | IEEE802154_ATTR_PAD)) | ||
627 | return -EMSGSIZE; | 630 | return -EMSGSIZE; |
628 | } | 631 | } |
629 | 632 | ||
@@ -638,7 +641,7 @@ ieee802154_llsec_fill_key_id(struct sk_buff *msg, | |||
638 | 641 | ||
639 | if (desc->mode == IEEE802154_SCF_KEY_HW_INDEX && | 642 | if (desc->mode == IEEE802154_SCF_KEY_HW_INDEX && |
640 | nla_put_hwaddr(msg, IEEE802154_ATTR_LLSEC_KEY_SOURCE_EXTENDED, | 643 | nla_put_hwaddr(msg, IEEE802154_ATTR_LLSEC_KEY_SOURCE_EXTENDED, |
641 | desc->extended_source)) | 644 | desc->extended_source, IEEE802154_ATTR_PAD)) |
642 | return -EMSGSIZE; | 645 | return -EMSGSIZE; |
643 | 646 | ||
644 | return 0; | 647 | return 0; |
@@ -1063,7 +1066,8 @@ ieee802154_nl_fill_dev(struct sk_buff *msg, u32 portid, u32 seq, | |||
1063 | nla_put_shortaddr(msg, IEEE802154_ATTR_PAN_ID, desc->pan_id) || | 1066 | nla_put_shortaddr(msg, IEEE802154_ATTR_PAN_ID, desc->pan_id) || |
1064 | nla_put_shortaddr(msg, IEEE802154_ATTR_SHORT_ADDR, | 1067 | nla_put_shortaddr(msg, IEEE802154_ATTR_SHORT_ADDR, |
1065 | desc->short_addr) || | 1068 | desc->short_addr) || |
1066 | nla_put_hwaddr(msg, IEEE802154_ATTR_HW_ADDR, desc->hwaddr) || | 1069 | nla_put_hwaddr(msg, IEEE802154_ATTR_HW_ADDR, desc->hwaddr, |
1070 | IEEE802154_ATTR_PAD) || | ||
1067 | nla_put_u32(msg, IEEE802154_ATTR_LLSEC_FRAME_COUNTER, | 1071 | nla_put_u32(msg, IEEE802154_ATTR_LLSEC_FRAME_COUNTER, |
1068 | desc->frame_counter) || | 1072 | desc->frame_counter) || |
1069 | nla_put_u8(msg, IEEE802154_ATTR_LLSEC_DEV_OVERRIDE, | 1073 | nla_put_u8(msg, IEEE802154_ATTR_LLSEC_DEV_OVERRIDE, |
@@ -1167,7 +1171,8 @@ ieee802154_nl_fill_devkey(struct sk_buff *msg, u32 portid, u32 seq, | |||
1167 | 1171 | ||
1168 | if (nla_put_string(msg, IEEE802154_ATTR_DEV_NAME, dev->name) || | 1172 | if (nla_put_string(msg, IEEE802154_ATTR_DEV_NAME, dev->name) || |
1169 | nla_put_u32(msg, IEEE802154_ATTR_DEV_INDEX, dev->ifindex) || | 1173 | nla_put_u32(msg, IEEE802154_ATTR_DEV_INDEX, dev->ifindex) || |
1170 | nla_put_hwaddr(msg, IEEE802154_ATTR_HW_ADDR, devaddr) || | 1174 | nla_put_hwaddr(msg, IEEE802154_ATTR_HW_ADDR, devaddr, |
1175 | IEEE802154_ATTR_PAD) || | ||
1171 | nla_put_u32(msg, IEEE802154_ATTR_LLSEC_FRAME_COUNTER, | 1176 | nla_put_u32(msg, IEEE802154_ATTR_LLSEC_FRAME_COUNTER, |
1172 | devkey->frame_counter) || | 1177 | devkey->frame_counter) || |
1173 | ieee802154_llsec_fill_key_id(msg, &devkey->key_id)) | 1178 | ieee802154_llsec_fill_key_id(msg, &devkey->key_id)) |
diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c index 614072064d03..8035c93dd527 100644 --- a/net/ieee802154/nl802154.c +++ b/net/ieee802154/nl802154.c | |||
@@ -813,7 +813,8 @@ nl802154_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flags, | |||
813 | 813 | ||
814 | if (nla_put_u32(msg, NL802154_ATTR_WPAN_PHY, rdev->wpan_phy_idx) || | 814 | if (nla_put_u32(msg, NL802154_ATTR_WPAN_PHY, rdev->wpan_phy_idx) || |
815 | nla_put_u32(msg, NL802154_ATTR_IFTYPE, wpan_dev->iftype) || | 815 | nla_put_u32(msg, NL802154_ATTR_IFTYPE, wpan_dev->iftype) || |
816 | nla_put_u64(msg, NL802154_ATTR_WPAN_DEV, wpan_dev_id(wpan_dev)) || | 816 | nla_put_u64_64bit(msg, NL802154_ATTR_WPAN_DEV, |
817 | wpan_dev_id(wpan_dev), NL802154_ATTR_PAD) || | ||
817 | nla_put_u32(msg, NL802154_ATTR_GENERATION, | 818 | nla_put_u32(msg, NL802154_ATTR_GENERATION, |
818 | rdev->devlist_generation ^ | 819 | rdev->devlist_generation ^ |
819 | (cfg802154_rdev_list_generation << 2))) | 820 | (cfg802154_rdev_list_generation << 2))) |
diff --git a/net/ipv6/ila/ila_lwt.c b/net/ipv6/ila/ila_lwt.c index 2ae3c4fd8aab..9db3621b2126 100644 --- a/net/ipv6/ila/ila_lwt.c +++ b/net/ipv6/ila/ila_lwt.c | |||
@@ -109,7 +109,8 @@ static int ila_fill_encap_info(struct sk_buff *skb, | |||
109 | { | 109 | { |
110 | struct ila_params *p = ila_params_lwtunnel(lwtstate); | 110 | struct ila_params *p = ila_params_lwtunnel(lwtstate); |
111 | 111 | ||
112 | if (nla_put_u64(skb, ILA_ATTR_LOCATOR, (__force u64)p->locator)) | 112 | if (nla_put_u64_64bit(skb, ILA_ATTR_LOCATOR, (__force u64)p->locator, |
113 | ILA_ATTR_PAD)) | ||
113 | goto nla_put_failure; | 114 | goto nla_put_failure; |
114 | 115 | ||
115 | return 0; | 116 | return 0; |
diff --git a/net/ipv6/ila/ila_xlat.c b/net/ipv6/ila/ila_xlat.c index 0b03533453e4..0e9e579410da 100644 --- a/net/ipv6/ila/ila_xlat.c +++ b/net/ipv6/ila/ila_xlat.c | |||
@@ -418,12 +418,15 @@ static int ila_nl_cmd_del_mapping(struct sk_buff *skb, struct genl_info *info) | |||
418 | 418 | ||
419 | static int ila_fill_info(struct ila_map *ila, struct sk_buff *msg) | 419 | static int ila_fill_info(struct ila_map *ila, struct sk_buff *msg) |
420 | { | 420 | { |
421 | if (nla_put_u64(msg, ILA_ATTR_IDENTIFIER, | 421 | if (nla_put_u64_64bit(msg, ILA_ATTR_IDENTIFIER, |
422 | (__force u64)ila->p.identifier) || | 422 | (__force u64)ila->p.identifier, |
423 | nla_put_u64(msg, ILA_ATTR_LOCATOR, | 423 | ILA_ATTR_PAD) || |
424 | (__force u64)ila->p.ip.locator) || | 424 | nla_put_u64_64bit(msg, ILA_ATTR_LOCATOR, |
425 | nla_put_u64(msg, ILA_ATTR_LOCATOR_MATCH, | 425 | (__force u64)ila->p.ip.locator, |
426 | (__force u64)ila->p.ip.locator_match) || | 426 | ILA_ATTR_PAD) || |
427 | nla_put_u64_64bit(msg, ILA_ATTR_LOCATOR_MATCH, | ||
428 | (__force u64)ila->p.ip.locator_match, | ||
429 | ILA_ATTR_PAD) || | ||
427 | nla_put_s32(msg, ILA_ATTR_IFINDEX, ila->p.ifindex) || | 430 | nla_put_s32(msg, ILA_ATTR_IFINDEX, ila->p.ifindex) || |
428 | nla_put_u32(msg, ILA_ATTR_DIR, ila->p.dir)) | 431 | nla_put_u32(msg, ILA_ATTR_DIR, ila->p.dir)) |
429 | return -1; | 432 | return -1; |
diff --git a/net/l2tp/l2tp_netlink.c b/net/l2tp/l2tp_netlink.c index 24ed2e875c45..1d02e8d20e56 100644 --- a/net/l2tp/l2tp_netlink.c +++ b/net/l2tp/l2tp_netlink.c | |||
@@ -346,22 +346,30 @@ static int l2tp_nl_tunnel_send(struct sk_buff *skb, u32 portid, u32 seq, int fla | |||
346 | if (nest == NULL) | 346 | if (nest == NULL) |
347 | goto nla_put_failure; | 347 | goto nla_put_failure; |
348 | 348 | ||
349 | if (nla_put_u64(skb, L2TP_ATTR_TX_PACKETS, | 349 | if (nla_put_u64_64bit(skb, L2TP_ATTR_TX_PACKETS, |
350 | atomic_long_read(&tunnel->stats.tx_packets)) || | 350 | atomic_long_read(&tunnel->stats.tx_packets), |
351 | nla_put_u64(skb, L2TP_ATTR_TX_BYTES, | 351 | L2TP_ATTR_STATS_PAD) || |
352 | atomic_long_read(&tunnel->stats.tx_bytes)) || | 352 | nla_put_u64_64bit(skb, L2TP_ATTR_TX_BYTES, |
353 | nla_put_u64(skb, L2TP_ATTR_TX_ERRORS, | 353 | atomic_long_read(&tunnel->stats.tx_bytes), |
354 | atomic_long_read(&tunnel->stats.tx_errors)) || | 354 | L2TP_ATTR_STATS_PAD) || |
355 | nla_put_u64(skb, L2TP_ATTR_RX_PACKETS, | 355 | nla_put_u64_64bit(skb, L2TP_ATTR_TX_ERRORS, |
356 | atomic_long_read(&tunnel->stats.rx_packets)) || | 356 | atomic_long_read(&tunnel->stats.tx_errors), |
357 | nla_put_u64(skb, L2TP_ATTR_RX_BYTES, | 357 | L2TP_ATTR_STATS_PAD) || |
358 | atomic_long_read(&tunnel->stats.rx_bytes)) || | 358 | nla_put_u64_64bit(skb, L2TP_ATTR_RX_PACKETS, |
359 | nla_put_u64(skb, L2TP_ATTR_RX_SEQ_DISCARDS, | 359 | atomic_long_read(&tunnel->stats.rx_packets), |
360 | atomic_long_read(&tunnel->stats.rx_seq_discards)) || | 360 | L2TP_ATTR_STATS_PAD) || |
361 | nla_put_u64(skb, L2TP_ATTR_RX_OOS_PACKETS, | 361 | nla_put_u64_64bit(skb, L2TP_ATTR_RX_BYTES, |
362 | atomic_long_read(&tunnel->stats.rx_oos_packets)) || | 362 | atomic_long_read(&tunnel->stats.rx_bytes), |
363 | nla_put_u64(skb, L2TP_ATTR_RX_ERRORS, | 363 | L2TP_ATTR_STATS_PAD) || |
364 | atomic_long_read(&tunnel->stats.rx_errors))) | 364 | nla_put_u64_64bit(skb, L2TP_ATTR_RX_SEQ_DISCARDS, |
365 | atomic_long_read(&tunnel->stats.rx_seq_discards), | ||
366 | L2TP_ATTR_STATS_PAD) || | ||
367 | nla_put_u64_64bit(skb, L2TP_ATTR_RX_OOS_PACKETS, | ||
368 | atomic_long_read(&tunnel->stats.rx_oos_packets), | ||
369 | L2TP_ATTR_STATS_PAD) || | ||
370 | nla_put_u64_64bit(skb, L2TP_ATTR_RX_ERRORS, | ||
371 | atomic_long_read(&tunnel->stats.rx_errors), | ||
372 | L2TP_ATTR_STATS_PAD)) | ||
365 | goto nla_put_failure; | 373 | goto nla_put_failure; |
366 | nla_nest_end(skb, nest); | 374 | nla_nest_end(skb, nest); |
367 | 375 | ||
@@ -754,22 +762,30 @@ static int l2tp_nl_session_send(struct sk_buff *skb, u32 portid, u32 seq, int fl | |||
754 | if (nest == NULL) | 762 | if (nest == NULL) |
755 | goto nla_put_failure; | 763 | goto nla_put_failure; |
756 | 764 | ||
757 | if (nla_put_u64(skb, L2TP_ATTR_TX_PACKETS, | 765 | if (nla_put_u64_64bit(skb, L2TP_ATTR_TX_PACKETS, |
758 | atomic_long_read(&session->stats.tx_packets)) || | 766 | atomic_long_read(&session->stats.tx_packets), |
759 | nla_put_u64(skb, L2TP_ATTR_TX_BYTES, | 767 | L2TP_ATTR_STATS_PAD) || |
760 | atomic_long_read(&session->stats.tx_bytes)) || | 768 | nla_put_u64_64bit(skb, L2TP_ATTR_TX_BYTES, |
761 | nla_put_u64(skb, L2TP_ATTR_TX_ERRORS, | 769 | atomic_long_read(&session->stats.tx_bytes), |
762 | atomic_long_read(&session->stats.tx_errors)) || | 770 | L2TP_ATTR_STATS_PAD) || |
763 | nla_put_u64(skb, L2TP_ATTR_RX_PACKETS, | 771 | nla_put_u64_64bit(skb, L2TP_ATTR_TX_ERRORS, |
764 | atomic_long_read(&session->stats.rx_packets)) || | 772 | atomic_long_read(&session->stats.tx_errors), |
765 | nla_put_u64(skb, L2TP_ATTR_RX_BYTES, | 773 | L2TP_ATTR_STATS_PAD) || |
766 | atomic_long_read(&session->stats.rx_bytes)) || | 774 | nla_put_u64_64bit(skb, L2TP_ATTR_RX_PACKETS, |
767 | nla_put_u64(skb, L2TP_ATTR_RX_SEQ_DISCARDS, | 775 | atomic_long_read(&session->stats.rx_packets), |
768 | atomic_long_read(&session->stats.rx_seq_discards)) || | 776 | L2TP_ATTR_STATS_PAD) || |
769 | nla_put_u64(skb, L2TP_ATTR_RX_OOS_PACKETS, | 777 | nla_put_u64_64bit(skb, L2TP_ATTR_RX_BYTES, |
770 | atomic_long_read(&session->stats.rx_oos_packets)) || | 778 | atomic_long_read(&session->stats.rx_bytes), |
771 | nla_put_u64(skb, L2TP_ATTR_RX_ERRORS, | 779 | L2TP_ATTR_STATS_PAD) || |
772 | atomic_long_read(&session->stats.rx_errors))) | 780 | nla_put_u64_64bit(skb, L2TP_ATTR_RX_SEQ_DISCARDS, |
781 | atomic_long_read(&session->stats.rx_seq_discards), | ||
782 | L2TP_ATTR_STATS_PAD) || | ||
783 | nla_put_u64_64bit(skb, L2TP_ATTR_RX_OOS_PACKETS, | ||
784 | atomic_long_read(&session->stats.rx_oos_packets), | ||
785 | L2TP_ATTR_STATS_PAD) || | ||
786 | nla_put_u64_64bit(skb, L2TP_ATTR_RX_ERRORS, | ||
787 | atomic_long_read(&session->stats.rx_errors), | ||
788 | L2TP_ATTR_STATS_PAD)) | ||
773 | goto nla_put_failure; | 789 | goto nla_put_failure; |
774 | nla_nest_end(skb, nest); | 790 | nla_nest_end(skb, nest); |
775 | 791 | ||
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index 404b2a4f4b5b..f35ebc02fa5c 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c | |||
@@ -2875,8 +2875,10 @@ static int ip_vs_genl_fill_stats(struct sk_buff *skb, int container_type, | |||
2875 | if (nla_put_u32(skb, IPVS_STATS_ATTR_CONNS, (u32)kstats->conns) || | 2875 | if (nla_put_u32(skb, IPVS_STATS_ATTR_CONNS, (u32)kstats->conns) || |
2876 | nla_put_u32(skb, IPVS_STATS_ATTR_INPKTS, (u32)kstats->inpkts) || | 2876 | nla_put_u32(skb, IPVS_STATS_ATTR_INPKTS, (u32)kstats->inpkts) || |
2877 | nla_put_u32(skb, IPVS_STATS_ATTR_OUTPKTS, (u32)kstats->outpkts) || | 2877 | nla_put_u32(skb, IPVS_STATS_ATTR_OUTPKTS, (u32)kstats->outpkts) || |
2878 | nla_put_u64(skb, IPVS_STATS_ATTR_INBYTES, kstats->inbytes) || | 2878 | nla_put_u64_64bit(skb, IPVS_STATS_ATTR_INBYTES, kstats->inbytes, |
2879 | nla_put_u64(skb, IPVS_STATS_ATTR_OUTBYTES, kstats->outbytes) || | 2879 | IPVS_STATS_ATTR_PAD) || |
2880 | nla_put_u64_64bit(skb, IPVS_STATS_ATTR_OUTBYTES, kstats->outbytes, | ||
2881 | IPVS_STATS_ATTR_PAD) || | ||
2880 | nla_put_u32(skb, IPVS_STATS_ATTR_CPS, (u32)kstats->cps) || | 2882 | nla_put_u32(skb, IPVS_STATS_ATTR_CPS, (u32)kstats->cps) || |
2881 | nla_put_u32(skb, IPVS_STATS_ATTR_INPPS, (u32)kstats->inpps) || | 2883 | nla_put_u32(skb, IPVS_STATS_ATTR_INPPS, (u32)kstats->inpps) || |
2882 | nla_put_u32(skb, IPVS_STATS_ATTR_OUTPPS, (u32)kstats->outpps) || | 2884 | nla_put_u32(skb, IPVS_STATS_ATTR_OUTPPS, (u32)kstats->outpps) || |
@@ -2900,16 +2902,26 @@ static int ip_vs_genl_fill_stats64(struct sk_buff *skb, int container_type, | |||
2900 | if (!nl_stats) | 2902 | if (!nl_stats) |
2901 | return -EMSGSIZE; | 2903 | return -EMSGSIZE; |
2902 | 2904 | ||
2903 | if (nla_put_u64(skb, IPVS_STATS_ATTR_CONNS, kstats->conns) || | 2905 | if (nla_put_u64_64bit(skb, IPVS_STATS_ATTR_CONNS, kstats->conns, |
2904 | nla_put_u64(skb, IPVS_STATS_ATTR_INPKTS, kstats->inpkts) || | 2906 | IPVS_STATS_ATTR_PAD) || |
2905 | nla_put_u64(skb, IPVS_STATS_ATTR_OUTPKTS, kstats->outpkts) || | 2907 | nla_put_u64_64bit(skb, IPVS_STATS_ATTR_INPKTS, kstats->inpkts, |
2906 | nla_put_u64(skb, IPVS_STATS_ATTR_INBYTES, kstats->inbytes) || | 2908 | IPVS_STATS_ATTR_PAD) || |
2907 | nla_put_u64(skb, IPVS_STATS_ATTR_OUTBYTES, kstats->outbytes) || | 2909 | nla_put_u64_64bit(skb, IPVS_STATS_ATTR_OUTPKTS, kstats->outpkts, |
2908 | nla_put_u64(skb, IPVS_STATS_ATTR_CPS, kstats->cps) || | 2910 | IPVS_STATS_ATTR_PAD) || |
2909 | nla_put_u64(skb, IPVS_STATS_ATTR_INPPS, kstats->inpps) || | 2911 | nla_put_u64_64bit(skb, IPVS_STATS_ATTR_INBYTES, kstats->inbytes, |
2910 | nla_put_u64(skb, IPVS_STATS_ATTR_OUTPPS, kstats->outpps) || | 2912 | IPVS_STATS_ATTR_PAD) || |
2911 | nla_put_u64(skb, IPVS_STATS_ATTR_INBPS, kstats->inbps) || | 2913 | nla_put_u64_64bit(skb, IPVS_STATS_ATTR_OUTBYTES, kstats->outbytes, |
2912 | nla_put_u64(skb, IPVS_STATS_ATTR_OUTBPS, kstats->outbps)) | 2914 | IPVS_STATS_ATTR_PAD) || |
2915 | nla_put_u64_64bit(skb, IPVS_STATS_ATTR_CPS, kstats->cps, | ||
2916 | IPVS_STATS_ATTR_PAD) || | ||
2917 | nla_put_u64_64bit(skb, IPVS_STATS_ATTR_INPPS, kstats->inpps, | ||
2918 | IPVS_STATS_ATTR_PAD) || | ||
2919 | nla_put_u64_64bit(skb, IPVS_STATS_ATTR_OUTPPS, kstats->outpps, | ||
2920 | IPVS_STATS_ATTR_PAD) || | ||
2921 | nla_put_u64_64bit(skb, IPVS_STATS_ATTR_INBPS, kstats->inbps, | ||
2922 | IPVS_STATS_ATTR_PAD) || | ||
2923 | nla_put_u64_64bit(skb, IPVS_STATS_ATTR_OUTBPS, kstats->outbps, | ||
2924 | IPVS_STATS_ATTR_PAD)) | ||
2913 | goto nla_put_failure; | 2925 | goto nla_put_failure; |
2914 | nla_nest_end(skb, nl_stats); | 2926 | nla_nest_end(skb, nl_stats); |
2915 | 2927 | ||
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index 0cc66a4e492d..22d9a5316304 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c | |||
@@ -754,7 +754,8 @@ static int ovs_flow_cmd_fill_stats(const struct sw_flow *flow, | |||
754 | ovs_flow_stats_get(flow, &stats, &used, &tcp_flags); | 754 | ovs_flow_stats_get(flow, &stats, &used, &tcp_flags); |
755 | 755 | ||
756 | if (used && | 756 | if (used && |
757 | nla_put_u64(skb, OVS_FLOW_ATTR_USED, ovs_flow_used_time(used))) | 757 | nla_put_u64_64bit(skb, OVS_FLOW_ATTR_USED, ovs_flow_used_time(used), |
758 | OVS_FLOW_ATTR_PAD)) | ||
758 | return -EMSGSIZE; | 759 | return -EMSGSIZE; |
759 | 760 | ||
760 | if (stats.n_packets && | 761 | if (stats.n_packets && |
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 87b02ed3d5f2..f6bf5818ed4d 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c | |||
@@ -1122,10 +1122,12 @@ static int htb_dump_class(struct Qdisc *sch, unsigned long arg, | |||
1122 | if (nla_put(skb, TCA_HTB_PARMS, sizeof(opt), &opt)) | 1122 | if (nla_put(skb, TCA_HTB_PARMS, sizeof(opt), &opt)) |
1123 | goto nla_put_failure; | 1123 | goto nla_put_failure; |
1124 | if ((cl->rate.rate_bytes_ps >= (1ULL << 32)) && | 1124 | if ((cl->rate.rate_bytes_ps >= (1ULL << 32)) && |
1125 | nla_put_u64(skb, TCA_HTB_RATE64, cl->rate.rate_bytes_ps)) | 1125 | nla_put_u64_64bit(skb, TCA_HTB_RATE64, cl->rate.rate_bytes_ps, |
1126 | TCA_HTB_PAD)) | ||
1126 | goto nla_put_failure; | 1127 | goto nla_put_failure; |
1127 | if ((cl->ceil.rate_bytes_ps >= (1ULL << 32)) && | 1128 | if ((cl->ceil.rate_bytes_ps >= (1ULL << 32)) && |
1128 | nla_put_u64(skb, TCA_HTB_CEIL64, cl->ceil.rate_bytes_ps)) | 1129 | nla_put_u64_64bit(skb, TCA_HTB_CEIL64, cl->ceil.rate_bytes_ps, |
1130 | TCA_HTB_PAD)) | ||
1129 | goto nla_put_failure; | 1131 | goto nla_put_failure; |
1130 | 1132 | ||
1131 | return nla_nest_end(skb, nest); | 1133 | return nla_nest_end(skb, nest); |
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index 9640bb39a5d2..491d6fd6430c 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c | |||
@@ -994,7 +994,8 @@ static int netem_dump(struct Qdisc *sch, struct sk_buff *skb) | |||
994 | goto nla_put_failure; | 994 | goto nla_put_failure; |
995 | 995 | ||
996 | if (q->rate >= (1ULL << 32)) { | 996 | if (q->rate >= (1ULL << 32)) { |
997 | if (nla_put_u64(skb, TCA_NETEM_RATE64, q->rate)) | 997 | if (nla_put_u64_64bit(skb, TCA_NETEM_RATE64, q->rate, |
998 | TCA_NETEM_PAD)) | ||
998 | goto nla_put_failure; | 999 | goto nla_put_failure; |
999 | rate.rate = ~0U; | 1000 | rate.rate = ~0U; |
1000 | } else { | 1001 | } else { |
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c index c2fbde742f37..83b90b584fae 100644 --- a/net/sched/sch_tbf.c +++ b/net/sched/sch_tbf.c | |||
@@ -472,11 +472,13 @@ static int tbf_dump(struct Qdisc *sch, struct sk_buff *skb) | |||
472 | if (nla_put(skb, TCA_TBF_PARMS, sizeof(opt), &opt)) | 472 | if (nla_put(skb, TCA_TBF_PARMS, sizeof(opt), &opt)) |
473 | goto nla_put_failure; | 473 | goto nla_put_failure; |
474 | if (q->rate.rate_bytes_ps >= (1ULL << 32) && | 474 | if (q->rate.rate_bytes_ps >= (1ULL << 32) && |
475 | nla_put_u64(skb, TCA_TBF_RATE64, q->rate.rate_bytes_ps)) | 475 | nla_put_u64_64bit(skb, TCA_TBF_RATE64, q->rate.rate_bytes_ps, |
476 | TCA_TBF_PAD)) | ||
476 | goto nla_put_failure; | 477 | goto nla_put_failure; |
477 | if (tbf_peak_present(q) && | 478 | if (tbf_peak_present(q) && |
478 | q->peak.rate_bytes_ps >= (1ULL << 32) && | 479 | q->peak.rate_bytes_ps >= (1ULL << 32) && |
479 | nla_put_u64(skb, TCA_TBF_PRATE64, q->peak.rate_bytes_ps)) | 480 | nla_put_u64_64bit(skb, TCA_TBF_PRATE64, q->peak.rate_bytes_ps, |
481 | TCA_TBF_PAD)) | ||
480 | goto nla_put_failure; | 482 | goto nla_put_failure; |
481 | 483 | ||
482 | return nla_nest_end(skb, nest); | 484 | return nla_nest_end(skb, nest); |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index fd7f34a2b10c..afeb1ef1b199 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -2429,7 +2429,8 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flag | |||
2429 | 2429 | ||
2430 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || | 2430 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || |
2431 | nla_put_u32(msg, NL80211_ATTR_IFTYPE, wdev->iftype) || | 2431 | nla_put_u32(msg, NL80211_ATTR_IFTYPE, wdev->iftype) || |
2432 | nla_put_u64(msg, NL80211_ATTR_WDEV, wdev_id(wdev)) || | 2432 | nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev), |
2433 | NL80211_ATTR_PAD) || | ||
2433 | nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, wdev_address(wdev)) || | 2434 | nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, wdev_address(wdev)) || |
2434 | nla_put_u32(msg, NL80211_ATTR_GENERATION, | 2435 | nla_put_u32(msg, NL80211_ATTR_GENERATION, |
2435 | rdev->devlist_generation ^ | 2436 | rdev->devlist_generation ^ |
@@ -6874,7 +6875,8 @@ static int nl80211_send_bss(struct sk_buff *msg, struct netlink_callback *cb, | |||
6874 | if (wdev->netdev && | 6875 | if (wdev->netdev && |
6875 | nla_put_u32(msg, NL80211_ATTR_IFINDEX, wdev->netdev->ifindex)) | 6876 | nla_put_u32(msg, NL80211_ATTR_IFINDEX, wdev->netdev->ifindex)) |
6876 | goto nla_put_failure; | 6877 | goto nla_put_failure; |
6877 | if (nla_put_u64(msg, NL80211_ATTR_WDEV, wdev_id(wdev))) | 6878 | if (nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev), |
6879 | NL80211_ATTR_PAD)) | ||
6878 | goto nla_put_failure; | 6880 | goto nla_put_failure; |
6879 | 6881 | ||
6880 | bss = nla_nest_start(msg, NL80211_ATTR_BSS); | 6882 | bss = nla_nest_start(msg, NL80211_ATTR_BSS); |
@@ -6895,7 +6897,8 @@ static int nl80211_send_bss(struct sk_buff *msg, struct netlink_callback *cb, | |||
6895 | */ | 6897 | */ |
6896 | ies = rcu_dereference(res->ies); | 6898 | ies = rcu_dereference(res->ies); |
6897 | if (ies) { | 6899 | if (ies) { |
6898 | if (nla_put_u64(msg, NL80211_BSS_TSF, ies->tsf)) | 6900 | if (nla_put_u64_64bit(msg, NL80211_BSS_TSF, ies->tsf, |
6901 | NL80211_BSS_PAD)) | ||
6899 | goto fail_unlock_rcu; | 6902 | goto fail_unlock_rcu; |
6900 | if (ies->len && nla_put(msg, NL80211_BSS_INFORMATION_ELEMENTS, | 6903 | if (ies->len && nla_put(msg, NL80211_BSS_INFORMATION_ELEMENTS, |
6901 | ies->len, ies->data)) | 6904 | ies->len, ies->data)) |
@@ -6905,7 +6908,8 @@ static int nl80211_send_bss(struct sk_buff *msg, struct netlink_callback *cb, | |||
6905 | /* and this pointer is always (unless driver didn't know) beacon data */ | 6908 | /* and this pointer is always (unless driver didn't know) beacon data */ |
6906 | ies = rcu_dereference(res->beacon_ies); | 6909 | ies = rcu_dereference(res->beacon_ies); |
6907 | if (ies && ies->from_beacon) { | 6910 | if (ies && ies->from_beacon) { |
6908 | if (nla_put_u64(msg, NL80211_BSS_BEACON_TSF, ies->tsf)) | 6911 | if (nla_put_u64_64bit(msg, NL80211_BSS_BEACON_TSF, ies->tsf, |
6912 | NL80211_BSS_PAD)) | ||
6909 | goto fail_unlock_rcu; | 6913 | goto fail_unlock_rcu; |
6910 | if (ies->len && nla_put(msg, NL80211_BSS_BEACON_IES, | 6914 | if (ies->len && nla_put(msg, NL80211_BSS_BEACON_IES, |
6911 | ies->len, ies->data)) | 6915 | ies->len, ies->data)) |
@@ -6924,8 +6928,8 @@ static int nl80211_send_bss(struct sk_buff *msg, struct netlink_callback *cb, | |||
6924 | goto nla_put_failure; | 6928 | goto nla_put_failure; |
6925 | 6929 | ||
6926 | if (intbss->ts_boottime && | 6930 | if (intbss->ts_boottime && |
6927 | nla_put_u64(msg, NL80211_BSS_LAST_SEEN_BOOTTIME, | 6931 | nla_put_u64_64bit(msg, NL80211_BSS_LAST_SEEN_BOOTTIME, |
6928 | intbss->ts_boottime)) | 6932 | intbss->ts_boottime, NL80211_BSS_PAD)) |
6929 | goto nla_put_failure; | 6933 | goto nla_put_failure; |
6930 | 6934 | ||
6931 | switch (rdev->wiphy.signal_type) { | 6935 | switch (rdev->wiphy.signal_type) { |
@@ -7045,28 +7049,28 @@ static int nl80211_send_survey(struct sk_buff *msg, u32 portid, u32 seq, | |||
7045 | nla_put_flag(msg, NL80211_SURVEY_INFO_IN_USE)) | 7049 | nla_put_flag(msg, NL80211_SURVEY_INFO_IN_USE)) |
7046 | goto nla_put_failure; | 7050 | goto nla_put_failure; |
7047 | if ((survey->filled & SURVEY_INFO_TIME) && | 7051 | if ((survey->filled & SURVEY_INFO_TIME) && |
7048 | nla_put_u64(msg, NL80211_SURVEY_INFO_TIME, | 7052 | nla_put_u64_64bit(msg, NL80211_SURVEY_INFO_TIME, |
7049 | survey->time)) | 7053 | survey->time, NL80211_SURVEY_INFO_PAD)) |
7050 | goto nla_put_failure; | 7054 | goto nla_put_failure; |
7051 | if ((survey->filled & SURVEY_INFO_TIME_BUSY) && | 7055 | if ((survey->filled & SURVEY_INFO_TIME_BUSY) && |
7052 | nla_put_u64(msg, NL80211_SURVEY_INFO_TIME_BUSY, | 7056 | nla_put_u64_64bit(msg, NL80211_SURVEY_INFO_TIME_BUSY, |
7053 | survey->time_busy)) | 7057 | survey->time_busy, NL80211_SURVEY_INFO_PAD)) |
7054 | goto nla_put_failure; | 7058 | goto nla_put_failure; |
7055 | if ((survey->filled & SURVEY_INFO_TIME_EXT_BUSY) && | 7059 | if ((survey->filled & SURVEY_INFO_TIME_EXT_BUSY) && |
7056 | nla_put_u64(msg, NL80211_SURVEY_INFO_TIME_EXT_BUSY, | 7060 | nla_put_u64_64bit(msg, NL80211_SURVEY_INFO_TIME_EXT_BUSY, |
7057 | survey->time_ext_busy)) | 7061 | survey->time_ext_busy, NL80211_SURVEY_INFO_PAD)) |
7058 | goto nla_put_failure; | 7062 | goto nla_put_failure; |
7059 | if ((survey->filled & SURVEY_INFO_TIME_RX) && | 7063 | if ((survey->filled & SURVEY_INFO_TIME_RX) && |
7060 | nla_put_u64(msg, NL80211_SURVEY_INFO_TIME_RX, | 7064 | nla_put_u64_64bit(msg, NL80211_SURVEY_INFO_TIME_RX, |
7061 | survey->time_rx)) | 7065 | survey->time_rx, NL80211_SURVEY_INFO_PAD)) |
7062 | goto nla_put_failure; | 7066 | goto nla_put_failure; |
7063 | if ((survey->filled & SURVEY_INFO_TIME_TX) && | 7067 | if ((survey->filled & SURVEY_INFO_TIME_TX) && |
7064 | nla_put_u64(msg, NL80211_SURVEY_INFO_TIME_TX, | 7068 | nla_put_u64_64bit(msg, NL80211_SURVEY_INFO_TIME_TX, |
7065 | survey->time_tx)) | 7069 | survey->time_tx, NL80211_SURVEY_INFO_PAD)) |
7066 | goto nla_put_failure; | 7070 | goto nla_put_failure; |
7067 | if ((survey->filled & SURVEY_INFO_TIME_SCAN) && | 7071 | if ((survey->filled & SURVEY_INFO_TIME_SCAN) && |
7068 | nla_put_u64(msg, NL80211_SURVEY_INFO_TIME_SCAN, | 7072 | nla_put_u64_64bit(msg, NL80211_SURVEY_INFO_TIME_SCAN, |
7069 | survey->time_scan)) | 7073 | survey->time_scan, NL80211_SURVEY_INFO_PAD)) |
7070 | goto nla_put_failure; | 7074 | goto nla_put_failure; |
7071 | 7075 | ||
7072 | nla_nest_end(msg, infoattr); | 7076 | nla_nest_end(msg, infoattr); |
@@ -7786,8 +7790,8 @@ __cfg80211_alloc_vendor_skb(struct cfg80211_registered_device *rdev, | |||
7786 | } | 7790 | } |
7787 | 7791 | ||
7788 | if (wdev) { | 7792 | if (wdev) { |
7789 | if (nla_put_u64(skb, NL80211_ATTR_WDEV, | 7793 | if (nla_put_u64_64bit(skb, NL80211_ATTR_WDEV, |
7790 | wdev_id(wdev))) | 7794 | wdev_id(wdev), NL80211_ATTR_PAD)) |
7791 | goto nla_put_failure; | 7795 | goto nla_put_failure; |
7792 | if (wdev->netdev && | 7796 | if (wdev->netdev && |
7793 | nla_put_u32(skb, NL80211_ATTR_IFINDEX, | 7797 | nla_put_u32(skb, NL80211_ATTR_IFINDEX, |
@@ -8380,7 +8384,8 @@ static int nl80211_remain_on_channel(struct sk_buff *skb, | |||
8380 | if (err) | 8384 | if (err) |
8381 | goto free_msg; | 8385 | goto free_msg; |
8382 | 8386 | ||
8383 | if (nla_put_u64(msg, NL80211_ATTR_COOKIE, cookie)) | 8387 | if (nla_put_u64_64bit(msg, NL80211_ATTR_COOKIE, cookie, |
8388 | NL80211_ATTR_PAD)) | ||
8384 | goto nla_put_failure; | 8389 | goto nla_put_failure; |
8385 | 8390 | ||
8386 | genlmsg_end(msg, hdr); | 8391 | genlmsg_end(msg, hdr); |
@@ -8792,7 +8797,8 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info) | |||
8792 | goto free_msg; | 8797 | goto free_msg; |
8793 | 8798 | ||
8794 | if (msg) { | 8799 | if (msg) { |
8795 | if (nla_put_u64(msg, NL80211_ATTR_COOKIE, cookie)) | 8800 | if (nla_put_u64_64bit(msg, NL80211_ATTR_COOKIE, cookie, |
8801 | NL80211_ATTR_PAD)) | ||
8796 | goto nla_put_failure; | 8802 | goto nla_put_failure; |
8797 | 8803 | ||
8798 | genlmsg_end(msg, hdr); | 8804 | genlmsg_end(msg, hdr); |
@@ -10078,7 +10084,8 @@ static int nl80211_probe_client(struct sk_buff *skb, | |||
10078 | if (err) | 10084 | if (err) |
10079 | goto free_msg; | 10085 | goto free_msg; |
10080 | 10086 | ||
10081 | if (nla_put_u64(msg, NL80211_ATTR_COOKIE, cookie)) | 10087 | if (nla_put_u64_64bit(msg, NL80211_ATTR_COOKIE, cookie, |
10088 | NL80211_ATTR_PAD)) | ||
10082 | goto nla_put_failure; | 10089 | goto nla_put_failure; |
10083 | 10090 | ||
10084 | genlmsg_end(msg, hdr); | 10091 | genlmsg_end(msg, hdr); |
@@ -10503,8 +10510,9 @@ static int nl80211_vendor_cmd_dump(struct sk_buff *skb, | |||
10503 | break; | 10510 | break; |
10504 | 10511 | ||
10505 | if (nla_put_u32(skb, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || | 10512 | if (nla_put_u32(skb, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || |
10506 | (wdev && nla_put_u64(skb, NL80211_ATTR_WDEV, | 10513 | (wdev && nla_put_u64_64bit(skb, NL80211_ATTR_WDEV, |
10507 | wdev_id(wdev)))) { | 10514 | wdev_id(wdev), |
10515 | NL80211_ATTR_PAD))) { | ||
10508 | genlmsg_cancel(skb, hdr); | 10516 | genlmsg_cancel(skb, hdr); |
10509 | break; | 10517 | break; |
10510 | } | 10518 | } |
@@ -11711,7 +11719,8 @@ static int nl80211_send_scan_msg(struct sk_buff *msg, | |||
11711 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || | 11719 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || |
11712 | (wdev->netdev && nla_put_u32(msg, NL80211_ATTR_IFINDEX, | 11720 | (wdev->netdev && nla_put_u32(msg, NL80211_ATTR_IFINDEX, |
11713 | wdev->netdev->ifindex)) || | 11721 | wdev->netdev->ifindex)) || |
11714 | nla_put_u64(msg, NL80211_ATTR_WDEV, wdev_id(wdev))) | 11722 | nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev), |
11723 | NL80211_ATTR_PAD)) | ||
11715 | goto nla_put_failure; | 11724 | goto nla_put_failure; |
11716 | 11725 | ||
11717 | /* ignore errors and send incomplete event anyway */ | 11726 | /* ignore errors and send incomplete event anyway */ |
@@ -12378,11 +12387,13 @@ static void nl80211_send_remain_on_chan_event( | |||
12378 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || | 12387 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || |
12379 | (wdev->netdev && nla_put_u32(msg, NL80211_ATTR_IFINDEX, | 12388 | (wdev->netdev && nla_put_u32(msg, NL80211_ATTR_IFINDEX, |
12380 | wdev->netdev->ifindex)) || | 12389 | wdev->netdev->ifindex)) || |
12381 | nla_put_u64(msg, NL80211_ATTR_WDEV, wdev_id(wdev)) || | 12390 | nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev), |
12391 | NL80211_ATTR_PAD) || | ||
12382 | nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, chan->center_freq) || | 12392 | nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, chan->center_freq) || |
12383 | nla_put_u32(msg, NL80211_ATTR_WIPHY_CHANNEL_TYPE, | 12393 | nla_put_u32(msg, NL80211_ATTR_WIPHY_CHANNEL_TYPE, |
12384 | NL80211_CHAN_NO_HT) || | 12394 | NL80211_CHAN_NO_HT) || |
12385 | nla_put_u64(msg, NL80211_ATTR_COOKIE, cookie)) | 12395 | nla_put_u64_64bit(msg, NL80211_ATTR_COOKIE, cookie, |
12396 | NL80211_ATTR_PAD)) | ||
12386 | goto nla_put_failure; | 12397 | goto nla_put_failure; |
12387 | 12398 | ||
12388 | if (cmd == NL80211_CMD_REMAIN_ON_CHANNEL && | 12399 | if (cmd == NL80211_CMD_REMAIN_ON_CHANNEL && |
@@ -12616,7 +12627,8 @@ int nl80211_send_mgmt(struct cfg80211_registered_device *rdev, | |||
12616 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || | 12627 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || |
12617 | (netdev && nla_put_u32(msg, NL80211_ATTR_IFINDEX, | 12628 | (netdev && nla_put_u32(msg, NL80211_ATTR_IFINDEX, |
12618 | netdev->ifindex)) || | 12629 | netdev->ifindex)) || |
12619 | nla_put_u64(msg, NL80211_ATTR_WDEV, wdev_id(wdev)) || | 12630 | nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev), |
12631 | NL80211_ATTR_PAD) || | ||
12620 | nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, freq) || | 12632 | nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, freq) || |
12621 | (sig_dbm && | 12633 | (sig_dbm && |
12622 | nla_put_u32(msg, NL80211_ATTR_RX_SIGNAL_DBM, sig_dbm)) || | 12634 | nla_put_u32(msg, NL80211_ATTR_RX_SIGNAL_DBM, sig_dbm)) || |
@@ -12659,9 +12671,11 @@ void cfg80211_mgmt_tx_status(struct wireless_dev *wdev, u64 cookie, | |||
12659 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || | 12671 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || |
12660 | (netdev && nla_put_u32(msg, NL80211_ATTR_IFINDEX, | 12672 | (netdev && nla_put_u32(msg, NL80211_ATTR_IFINDEX, |
12661 | netdev->ifindex)) || | 12673 | netdev->ifindex)) || |
12662 | nla_put_u64(msg, NL80211_ATTR_WDEV, wdev_id(wdev)) || | 12674 | nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev), |
12675 | NL80211_ATTR_PAD) || | ||
12663 | nla_put(msg, NL80211_ATTR_FRAME, len, buf) || | 12676 | nla_put(msg, NL80211_ATTR_FRAME, len, buf) || |
12664 | nla_put_u64(msg, NL80211_ATTR_COOKIE, cookie) || | 12677 | nla_put_u64_64bit(msg, NL80211_ATTR_COOKIE, cookie, |
12678 | NL80211_ATTR_PAD) || | ||
12665 | (ack && nla_put_flag(msg, NL80211_ATTR_ACK))) | 12679 | (ack && nla_put_flag(msg, NL80211_ATTR_ACK))) |
12666 | goto nla_put_failure; | 12680 | goto nla_put_failure; |
12667 | 12681 | ||
@@ -13041,7 +13055,8 @@ nl80211_radar_notify(struct cfg80211_registered_device *rdev, | |||
13041 | struct wireless_dev *wdev = netdev->ieee80211_ptr; | 13055 | struct wireless_dev *wdev = netdev->ieee80211_ptr; |
13042 | 13056 | ||
13043 | if (nla_put_u32(msg, NL80211_ATTR_IFINDEX, netdev->ifindex) || | 13057 | if (nla_put_u32(msg, NL80211_ATTR_IFINDEX, netdev->ifindex) || |
13044 | nla_put_u64(msg, NL80211_ATTR_WDEV, wdev_id(wdev))) | 13058 | nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev), |
13059 | NL80211_ATTR_PAD)) | ||
13045 | goto nla_put_failure; | 13060 | goto nla_put_failure; |
13046 | } | 13061 | } |
13047 | 13062 | ||
@@ -13086,7 +13101,8 @@ void cfg80211_probe_status(struct net_device *dev, const u8 *addr, | |||
13086 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || | 13101 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || |
13087 | nla_put_u32(msg, NL80211_ATTR_IFINDEX, dev->ifindex) || | 13102 | nla_put_u32(msg, NL80211_ATTR_IFINDEX, dev->ifindex) || |
13088 | nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, addr) || | 13103 | nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, addr) || |
13089 | nla_put_u64(msg, NL80211_ATTR_COOKIE, cookie) || | 13104 | nla_put_u64_64bit(msg, NL80211_ATTR_COOKIE, cookie, |
13105 | NL80211_ATTR_PAD) || | ||
13090 | (acked && nla_put_flag(msg, NL80211_ATTR_ACK))) | 13106 | (acked && nla_put_flag(msg, NL80211_ATTR_ACK))) |
13091 | goto nla_put_failure; | 13107 | goto nla_put_failure; |
13092 | 13108 | ||
@@ -13231,7 +13247,8 @@ void cfg80211_report_wowlan_wakeup(struct wireless_dev *wdev, | |||
13231 | goto free_msg; | 13247 | goto free_msg; |
13232 | 13248 | ||
13233 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || | 13249 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || |
13234 | nla_put_u64(msg, NL80211_ATTR_WDEV, wdev_id(wdev))) | 13250 | nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev), |
13251 | NL80211_ATTR_PAD)) | ||
13235 | goto free_msg; | 13252 | goto free_msg; |
13236 | 13253 | ||
13237 | if (wdev->netdev && nla_put_u32(msg, NL80211_ATTR_IFINDEX, | 13254 | if (wdev->netdev && nla_put_u32(msg, NL80211_ATTR_IFINDEX, |
@@ -13506,7 +13523,8 @@ void cfg80211_crit_proto_stopped(struct wireless_dev *wdev, gfp_t gfp) | |||
13506 | goto nla_put_failure; | 13523 | goto nla_put_failure; |
13507 | 13524 | ||
13508 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || | 13525 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || |
13509 | nla_put_u64(msg, NL80211_ATTR_WDEV, wdev_id(wdev))) | 13526 | nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev), |
13527 | NL80211_ATTR_PAD)) | ||
13510 | goto nla_put_failure; | 13528 | goto nla_put_failure; |
13511 | 13529 | ||
13512 | genlmsg_end(msg, hdr); | 13530 | genlmsg_end(msg, hdr); |
@@ -13539,7 +13557,8 @@ void nl80211_send_ap_stopped(struct wireless_dev *wdev) | |||
13539 | 13557 | ||
13540 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || | 13558 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || |
13541 | nla_put_u32(msg, NL80211_ATTR_IFINDEX, wdev->netdev->ifindex) || | 13559 | nla_put_u32(msg, NL80211_ATTR_IFINDEX, wdev->netdev->ifindex) || |
13542 | nla_put_u64(msg, NL80211_ATTR_WDEV, wdev_id(wdev))) | 13560 | nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev), |
13561 | NL80211_ATTR_PAD)) | ||
13543 | goto out; | 13562 | goto out; |
13544 | 13563 | ||
13545 | genlmsg_end(msg, hdr); | 13564 | genlmsg_end(msg, hdr); |