Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
fb475f71
Commit
fb475f71
authored
Mar 17, 2009
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement rxcost configuration keyword.
parent
6f530114
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
config.c
config.c
+9
-1
network.c
network.c
+4
-2
network.h
network.h
+1
-0
No files found.
config.c
View file @
fb475f71
...
...
@@ -357,7 +357,15 @@ parse_nconf(gnc_t gnc, void *closure)
if
(
c
<
-
1
)
goto
error
;
goto
error
;
/* for now */
if
(
strcmp
(
token
,
"rxcost"
)
==
0
)
{
int
cost
;
c
=
getint
(
c
,
&
cost
,
gnc
,
closure
);
if
(
c
<
-
1
||
cost
<=
0
||
cost
>
0xFFFF
)
goto
error
;
nconf
->
cost
=
cost
;
}
else
{
goto
error
;
}
}
return
nconf
;
...
...
network.c
View file @
fb475f71
...
...
@@ -261,12 +261,14 @@ network_up(struct network *net, int up)
if
(
wired
)
{
net
->
flags
|=
NET_WIRED
;
net
->
cost
=
96
;
net
->
cost
=
net
->
conf
&&
net
->
conf
->
cost
>
0
?
net
->
conf
->
cost
:
96
;
if
(
split_horizon
)
net
->
flags
|=
NET_SPLIT_HORIZON
;
}
else
{
net
->
flags
&=
~
NET_WIRED
;
net
->
cost
=
256
;
net
->
cost
=
net
->
conf
&&
net
->
conf
->
cost
>
0
?
net
->
conf
->
cost
:
256
;
}
update_hello_interval
(
net
);
...
...
network.h
View file @
fb475f71
...
...
@@ -29,6 +29,7 @@ struct buffered_update {
struct
network_conf
{
char
*
ifname
;
unsigned
short
cost
;
struct
network_conf
*
next
;
};
...
...
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