Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
84
Issues
84
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
cc1157a5
Commit
cc1157a5
authored
Mar 12, 2012
by
Tomasz Wlostowski
Committed by
Alessandro Rubini
Mar 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace/wrsw_rtud/rtud.c: remove disabled ports from broadcast forwarding mask
parent
6190e561
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
rtud.c
userspace/wrsw_rtud/rtud.c
+8
-5
No files found.
userspace/wrsw_rtud/rtud.c
View file @
cc1157a5
...
...
@@ -60,12 +60,8 @@ static int rtu_create_static_entries()
hexp_port_list_t
plist
;
hexp_port_state_t
pstate
;
int
i
,
err
;
uint32_t
enabled_port_mask
=
0
;
// Broadcast MAC
TRACE
(
TRACE_INFO
,
"adding static route for broadcast MAC..."
);
err
=
rtu_fd_create_entry
(
bcast_mac
,
0
,
0xffffffff
,
STATIC
);
if
(
err
)
return
err
;
// VLAN-aware Bridge reserved addresses (802.1Q-2005 Table 8.1)
TRACE
(
TRACE_INFO
,
"adding static routes for slow protocols..."
);
...
...
@@ -80,6 +76,7 @@ static int rtu_create_static_entries()
halexp_query_ports
(
&
plist
);
for
(
i
=
0
;
i
<
plist
.
num_ports
;
i
++
)
{
halexp_get_port_state
(
&
pstate
,
plist
.
port_names
[
i
]);
enabled_port_mask
|=
(
1
<<
pstate
.
hw_index
);
TRACE
(
TRACE_INFO
,
"adding static route for port %s index %d [mac %s]"
,
...
...
@@ -92,6 +89,12 @@ static int rtu_create_static_entries()
return
err
;
}
// Broadcast MAC
TRACE
(
TRACE_INFO
,
"adding static route for broadcast MAC..."
);
err
=
rtu_fd_create_entry
(
bcast_mac
,
0
,
enabled_port_mask
|
(
1
<<
NIC_PORT
),
STATIC
);
if
(
err
)
return
err
;
return
0
;
}
...
...
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