summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dev/net/ethertap.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/dev/net/ethertap.cc b/src/dev/net/ethertap.cc
index ca19b4884..8d08cc2d2 100644
--- a/src/dev/net/ethertap.cc
+++ b/src/dev/net/ethertap.cc
@@ -79,7 +79,16 @@ class TapEvent : public PollEvent
public:
TapEvent(EtherTapBase *_tap, int fd, int e)
: PollEvent(fd, e), tap(_tap) {}
- virtual void process(int revent) { tap->recvReal(revent); }
+
+ void
+ process(int revent) override
+ {
+ // Ensure that our event queue is active. It may not be since we get
+ // here from the PollQueue whenever a real packet happens to arrive.
+ EventQueue::ScopedMigration migrate(tap->eventQueue());
+
+ tap->recvReal(revent);
+ }
};
EtherTapBase::EtherTapBase(const Params *p)