packets forwarded by our client netvm are ok

This commit is contained in:
Pierre Alain 2024-04-14 18:35:52 +02:00
parent e18dbb602d
commit fc7f7f3544

View File

@ -333,6 +333,9 @@ struct
let src = ip.Ipv4_packet.src in let src = ip.Ipv4_packet.src in
if src = iface#other_ip then if src = iface#other_ip then
ipv4_from_client dns_client dns_servers router ~src:iface packet ipv4_from_client dns_client dns_servers router ~src:iface packet
else if iface#other_ip = router.config.netvm_ip then
(* This can occurs when used with *BSD as netvm (and a gateway is set) *)
ipv4_from_netvm router packet
else ( else (
Log.warn (fun f -> Log.warn (fun f ->
f "Incorrect source IP %a in IP packet from %a (dropping)" f "Incorrect source IP %a in IP packet from %a (dropping)"