Skip to content

Commit a674f07

Browse files
committed
1 parent 201d99b commit a674f07

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/link/af_spec/inet6_icmp.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use netlink_packet_utils::{
55
DecodeError,
66
};
77

8-
pub(crate) const ICMP6_STATS_LEN: usize = 48;
8+
pub(crate) const ICMP6_STATS_LEN: usize = 56;
99

1010
#[derive(Clone, Copy, Eq, PartialEq, Debug, Default)]
1111
#[non_exhaustive]
@@ -16,6 +16,7 @@ pub struct Icmp6Stats {
1616
pub out_msgs: i64,
1717
pub out_errors: i64,
1818
pub csum_errors: i64,
19+
pub out_ratelimit_host: i64,
1920
}
2021

2122
buffer!(Icmp6StatsBuffer(ICMP6_STATS_LEN) {
@@ -25,6 +26,7 @@ buffer!(Icmp6StatsBuffer(ICMP6_STATS_LEN) {
2526
out_msgs: (i64, 24..32),
2627
out_errors: (i64, 32..40),
2728
csum_errors: (i64, 40..48),
29+
out_ratelimit_host: (i64, 48..56),
2830
});
2931

3032
impl<T: AsRef<[u8]>> Parseable<Icmp6StatsBuffer<T>> for Icmp6Stats {
@@ -36,6 +38,7 @@ impl<T: AsRef<[u8]>> Parseable<Icmp6StatsBuffer<T>> for Icmp6Stats {
3638
out_msgs: buf.out_msgs(),
3739
out_errors: buf.out_errors(),
3840
csum_errors: buf.csum_errors(),
41+
out_ratelimit_host: buf.out_ratelimit_host(),
3942
})
4043
}
4144
}
@@ -53,5 +56,6 @@ impl Emitable for Icmp6Stats {
5356
buffer.set_out_msgs(self.out_msgs);
5457
buffer.set_out_errors(self.out_errors);
5558
buffer.set_csum_errors(self.csum_errors);
59+
buffer.set_out_ratelimit_host(self.out_ratelimit_host);
5660
}
5761
}

src/link/tests/statistics.rs

+1
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ fn test_parsing_link_statistics_on_kernel_4_18() {
380380
out_msgs: 6,
381381
out_errors: 0,
382382
csum_errors: 0,
383+
out_ratelimit_host: 0,
383384
}),
384385
AfSpecInet6::Token(std::net::Ipv6Addr::UNSPECIFIED),
385386
AfSpecInet6::AddrGenMode(1),

0 commit comments

Comments
 (0)