From e2403f0ea9af08adeb6352232356f98a3625645a Mon Sep 17 00:00:00 2001 From: Nikolay Edigaryev Date: Thu, 10 Nov 2022 20:31:18 +0400 Subject: [PATCH] Only perform DHCP snooping for frames destined to the VM (#10) --- lib/proxy/host.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/proxy/host.rs b/lib/proxy/host.rs index 40681fb..4f663a1 100644 --- a/lib/proxy/host.rs +++ b/lib/proxy/host.rs @@ -12,7 +12,9 @@ impl Proxy { // Snoop bootpd(8) replies from the host to // figure out the IP assigned to the VM - self.snoop(frame); + if frame.dst_addr() == self.vm_mac_address { + self.snoop(frame); + } self.vm .write(frame.as_ref())