|
1 | 1 | // SPDX-License-Identifier: MIT
|
2 | 2 |
|
3 |
| -use std::{fmt::Debug, net::Ipv6Addr}; |
| 3 | +use std::{fmt::Debug, mem::size_of, net::Ipv6Addr}; |
4 | 4 |
|
5 | 5 | use netlink_packet_core::{
|
6 | 6 | emit_u16_be, emit_u64_be, parse_u16_be, parse_u64_be, parse_u8,
|
@@ -179,13 +179,13 @@ impl Nla for RouteIp6Tunnel {
|
179 | 179 | fn value_len(&self) -> usize {
|
180 | 180 | match self {
|
181 | 181 | Self::Unspecified => 0,
|
182 |
| - Self::Id(_) => const { size_of::<u64>() }, |
183 |
| - Self::Destination(_) => const { size_of::<Ipv6Addr>() }, |
184 |
| - Self::Source(_) => const { size_of::<Ipv6Addr>() }, |
185 |
| - Self::Hoplimit(_) => const { size_of::<u8>() }, |
186 |
| - Self::Tc(_) => const { size_of::<u8>() }, |
187 |
| - Self::Flags(_) => const { size_of::<u16>() }, |
188 |
| - Self::Other(_) => const { size_of::<DefaultNla>() }, |
| 182 | + Self::Id(_) => size_of::<u64>(), |
| 183 | + Self::Destination(_) => size_of::<Ipv6Addr>(), |
| 184 | + Self::Source(_) => size_of::<Ipv6Addr>(), |
| 185 | + Self::Hoplimit(_) => size_of::<u8>(), |
| 186 | + Self::Tc(_) => size_of::<u8>(), |
| 187 | + Self::Flags(_) => size_of::<u16>(), |
| 188 | + Self::Other(_) => size_of::<DefaultNla>(), |
189 | 189 | }
|
190 | 190 | }
|
191 | 191 |
|
|
0 commit comments