Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
718d10d2
Commit
718d10d2
authored
Aug 30, 2021
by
Antoine Kaufmann
Browse files
sims/net/switch: don't forward to source port
parent
768f80eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
sims/net/switch/net_switch.cc
sims/net/switch/net_switch.cc
+2
-1
No files found.
sims/net/switch/net_switch.cc
View file @
718d10d2
...
...
@@ -413,7 +413,8 @@ static void switch_pkt(Port &port, size_t iport) {
auto
i
=
mac_table
.
find
(
dst
);
if
(
i
!=
mac_table
.
end
())
{
size_t
eport
=
i
->
second
;
forward_pkt
(
pkt_data
,
pkt_len
,
eport
);
if
(
eport
!=
iport
)
forward_pkt
(
pkt_data
,
pkt_len
,
eport
);
}
else
{
// Broadcast
for
(
size_t
eport
=
0
;
eport
<
ports
.
size
();
eport
++
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment