diff --git a/client_net.ml b/client_net.ml index 01a27f6..95b51c4 100644 --- a/client_net.ml +++ b/client_net.ml @@ -80,7 +80,7 @@ let add_vif { Dao.ClientVif.domid; device_id } ~client_ip ~router ~cleanup_tasks Router.add_client router iface >>= fun () -> Cleanup.on_cleanup cleanup_tasks (fun () -> Router.remove_client router iface); let fixed_arp = Client_eth.ARP.create ~net:client_eth iface in - Netback.listen backend ~header_size:14 (fun frame -> + Netback.listen backend ~header_size:Ethernet_wire.sizeof_ethernet (fun frame -> match Ethernet_packet.Unmarshal.of_cstruct frame with | exception ex -> Log.err (fun f -> f "Error unmarshalling ethernet frame from client: %s@.%a" (Printexc.to_string ex) diff --git a/uplink.ml b/uplink.ml index 7579292..06d4df3 100644 --- a/uplink.ml +++ b/uplink.ml @@ -32,7 +32,7 @@ module Make(Clock : Mirage_clock_lwt.MCLOCK) = struct end let listen t router = - Netif.listen t.net ~header_size:14 (fun frame -> + Netif.listen t.net ~header_size:Ethernet_wire.sizeof_ethernet (fun frame -> (* Handle one Ethernet frame from NetVM *) Eth.input t.eth ~arpv4:(Arp.input t.arp)