aboutsummaryrefslogtreecommitdiffstats
path: root/net/l2tp
diff options
context:
space:
mode:
Diffstat (limited to 'net/l2tp')
-rw-r--r--net/l2tp/l2tp_netlink.c80
1 files changed, 48 insertions, 32 deletions
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