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 <calle@cloudius-systems.com>
This commit is contained in:
Calle Wilund
2014-11-10 16:00:52 +01:00
committed by Avi Kivity
parent 63fb31a8be
commit c3ba7a73bb

View File

@@ -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<>();