mirror of
https://github.com/mirage/qubes-mirage-firewall.git
synced 2025-10-28 13:11:09 -04:00
commit
1f0016aee8
2 changed files with 13 additions and 17 deletions
|
|
@ -99,22 +99,18 @@ module ARP = struct
|
|||
if req_ipv4 = t.client_link#other_ip then (
|
||||
Log.info (fun f -> pf f "ignoring request for client's own IP");
|
||||
None)
|
||||
else
|
||||
match lookup t req_ipv4 with
|
||||
| None ->
|
||||
Log.info (fun f -> pf f "unknown address; not responding");
|
||||
None
|
||||
| Some req_mac ->
|
||||
Log.info (fun f -> pf f "responding with %a" Macaddr.pp req_mac);
|
||||
Some
|
||||
{
|
||||
Arp_packet.operation = Arp_packet.Reply;
|
||||
(* The Target Hardware Address and IP are copied from the request *)
|
||||
target_ip = arp.Arp_packet.source_ip;
|
||||
target_mac = arp.Arp_packet.source_mac;
|
||||
source_ip = req_ipv4;
|
||||
source_mac = req_mac;
|
||||
}
|
||||
else (
|
||||
Log.info (fun f ->
|
||||
pf f "responding with %a" Macaddr.pp t.client_link#my_mac);
|
||||
Some
|
||||
{
|
||||
Arp_packet.operation = Arp_packet.Reply;
|
||||
(* The Target Hardware Address and IP are copied from the request *)
|
||||
target_ip = arp.Arp_packet.source_ip;
|
||||
target_mac = arp.Arp_packet.source_mac;
|
||||
source_ip = req_ipv4;
|
||||
source_mac = t.client_link#my_mac;
|
||||
})
|
||||
|
||||
let input_gratuitous t arp =
|
||||
let source_ip = arp.Arp_packet.source_ip in
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
adb38a193ccfd7df940637fbec755a8abc66114b3721db1da6a011f938b47734 dist/qubes-firewall.xen
|
||||
2bfb49696e59a8ffbb660399e52bd82ffadbd02437d282eb8daab568b3261999 dist/qubes-firewall.xen
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue