Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/link/link_info/vxlan.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// SPDX-License-Identifier: MIT

use std::net::{Ipv4Addr, Ipv6Addr};
use std::{
fmt,
net::{Ipv4Addr, Ipv6Addr},
};

use netlink_packet_core::{
emit_u16_be, emit_u32, emit_u64_be, parse_u16_be, parse_u32, parse_u64_be,
Expand Down Expand Up @@ -65,6 +68,17 @@ impl From<u8> for VxlanDf {
}
}

impl fmt::Display for VxlanDf {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
VxlanDf::Unset => write!(f, "unset"),
VxlanDf::Set => write!(f, "set"),
VxlanDf::Inherit => write!(f, "inherit"),
VxlanDf::Other(v) => write!(f, "{v}"),
}
}
}

impl From<VxlanDf> for u8 {
fn from(d: VxlanDf) -> Self {
match d {
Expand Down
Loading