From 9a16d8c1bf71f9852b1ddbc1079bf9e1aaad2ab6 Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Mon, 18 Dec 2023 12:16:38 +0100 Subject: [PATCH] Only activate AddressFamily::Bridge on Linux Not supported on FreeBSD. Signed-off-by: Yann Dirson --- src/neighbour/add.rs | 1 + src/neighbour/handle.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/neighbour/add.rs b/src/neighbour/add.rs index 55abf22..141b4af 100644 --- a/src/neighbour/add.rs +++ b/src/neighbour/add.rs @@ -51,6 +51,7 @@ impl NeighbourAddRequest { } } + #[cfg(any(linux, android))] pub(crate) fn new_bridge(handle: Handle, index: u32, lla: &[u8]) -> Self { let mut message = NeighbourMessage::default(); diff --git a/src/neighbour/handle.rs b/src/neighbour/handle.rs index 15da656..6b2d845 100644 --- a/src/neighbour/handle.rs +++ b/src/neighbour/handle.rs @@ -23,6 +23,7 @@ impl NeighbourHandle { NeighbourAddRequest::new(self.0.clone(), index, destination) } + #[cfg(any(linux, android))] /// Add a new fdb entry (equivalent to `bridge fdb add`) pub fn add_bridge(&self, index: u32, lla: &[u8]) -> NeighbourAddRequest { NeighbourAddRequest::new_bridge(self.0.clone(), index, lla)