Commit 718d10d2 authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

sims/net/switch: don't forward to source port

parent 768f80eb
...@@ -413,6 +413,7 @@ static void switch_pkt(Port &port, size_t iport) { ...@@ -413,6 +413,7 @@ static void switch_pkt(Port &port, size_t iport) {
auto i = mac_table.find(dst); auto i = mac_table.find(dst);
if (i != mac_table.end()) { if (i != mac_table.end()) {
size_t eport = i->second; size_t eport = i->second;
if (eport != iport)
forward_pkt(pkt_data, pkt_len, eport); forward_pkt(pkt_data, pkt_len, eport);
} else { } else {
// Broadcast // Broadcast
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment