summaryrefslogtreecommitdiff
path: root/src/dev/net/ethertap.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/dev/net/ethertap.cc')
-rw-r--r--src/dev/net/ethertap.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/dev/net/ethertap.cc b/src/dev/net/ethertap.cc
index bf2dc6885..552296d5c 100644
--- a/src/dev/net/ethertap.cc
+++ b/src/dev/net/ethertap.cc
@@ -159,15 +159,12 @@ EtherTapBase::stopPolling()
}
-EtherInt*
-EtherTapBase::getEthPort(const std::string &if_name, int idx)
+Port &
+EtherTapBase::getPort(const std::string &if_name, PortID idx)
{
- if (if_name == "tap") {
- if (interface->getPeer())
- panic("Interface already connected to\n");
- return interface;
- }
- return NULL;
+ if (if_name == "tap")
+ return *interface;
+ return SimObject::getPort(if_name, idx);
}
bool