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
b10e16fe
Commit
b10e16fe
authored
Feb 02, 2011
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement config file parsing of the faraway flag.
parent
a49f86af
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
config.c
config.c
+6
-0
network.c
network.c
+3
-0
network.h
network.h
+1
-0
No files found.
config.c
View file @
b10e16fe
...
...
@@ -427,6 +427,12 @@ parse_nconf(gnc_t gnc, void *closure)
if
(
c
<
-
1
)
goto
error
;
nconf
->
wired
=
v
;
}
else
if
(
strcmp
(
token
,
"faraway"
)
==
0
)
{
int
v
;
c
=
getbool
(
c
,
&
v
,
gnc
,
closure
);
if
(
c
<
-
1
)
goto
error
;
nconf
->
faraway
=
v
;
}
else
if
(
strcmp
(
token
,
"link-quality"
)
==
0
)
{
int
v
;
c
=
getbool
(
c
,
&
v
,
gnc
,
closure
);
...
...
network.c
View file @
b10e16fe
...
...
@@ -312,6 +312,9 @@ network_up(struct network *net, int up)
net
->
flags
|=
NET_LQ
;
}
if
(
NET_CONF
(
net
,
faraway
)
==
CONFIG_YES
)
net
->
flags
|=
NET_FARAWAY
;
net
->
activity_time
=
now
.
tv_sec
;
update_hello_interval
(
net
);
/* Since the interface was marked as active above, the
...
...
network.h
View file @
b10e16fe
...
...
@@ -35,6 +35,7 @@ struct network_conf {
char
wired
;
char
split_horizon
;
char
lq
;
char
faraway
;
int
channel
;
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