From c3ba7a73bb640b286cab1ea14e7d44062eaae221 Mon Sep 17 00:00:00 2001 From: Calle Wilund Date: Mon, 10 Nov 2014 16:00:52 +0100 Subject: [PATCH] dhcp: actually ensure that packets are processed on cpu 0 Previous code (or lack thereof) hoped to achieve this. Not quite successfully. Signed-off-by: Calle Wilund --- net/dhcp.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/dhcp.cc b/net/dhcp.cc index 7cc4a166d2..3e6546d847 100644 --- a/net/dhcp.cc +++ b/net/dhcp.cc @@ -257,6 +257,11 @@ public: : _stack(stack) {} + unsigned forward(packet& p, size_t off, ipv4_address from, ipv4_address to, bool & handled) override { + handled = true; + return engine.cpu_id(); + } + future<> handle(packet& p, ip_hdr* iph, ethernet_address from, bool & handled) override { if (_state == state::NONE || p.len() < sizeof(dhcp_packet_base)) { return make_ready_future<>();