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
03bd8943
Commit
03bd8943
authored
Feb 11, 2012
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add explicit time constant resend_delay rather than computing it on the fly.
parent
9f6b322a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
15 deletions
+9
-15
babeld.c
babeld.c
+6
-0
babeld.h
babeld.h
+1
-0
message.c
message.c
+2
-15
No files found.
babeld.c
View file @
03bd8943
...
@@ -64,6 +64,7 @@ int link_detect = 0;
...
@@ -64,6 +64,7 @@ int link_detect = 0;
int
all_wireless
=
0
;
int
all_wireless
=
0
;
int
wireless_hello_interval
=
-
1
;
int
wireless_hello_interval
=
-
1
;
int
wired_hello_interval
=
-
1
;
int
wired_hello_interval
=
-
1
;
int
resend_delay
=
-
1
;
int
do_daemonise
=
0
;
int
do_daemonise
=
0
;
char
*
logfile
=
NULL
,
*
pidfile
=
"/var/run/babeld.pid"
;
char
*
logfile
=
NULL
,
*
pidfile
=
"/var/run/babeld.pid"
;
...
@@ -268,6 +269,11 @@ main(int argc, char **argv)
...
@@ -268,6 +269,11 @@ main(int argc, char **argv)
wired_hello_interval
=
4000
;
wired_hello_interval
=
4000
;
wired_hello_interval
=
MAX
(
wired_hello_interval
,
5
);
wired_hello_interval
=
MAX
(
wired_hello_interval
,
5
);
resend_delay
=
2000
;
resend_delay
=
MIN
(
resend_delay
,
wireless_hello_interval
/
2
);
resend_delay
=
MIN
(
resend_delay
,
wired_hello_interval
/
2
);
resend_delay
=
MAX
(
resend_delay
,
20
);
if
(
parasitic
&&
allow_duplicates
>=
0
)
{
if
(
parasitic
&&
allow_duplicates
>=
0
)
{
/* Too difficult to get right. */
/* Too difficult to get right. */
fprintf
(
stderr
,
"Sorry, -P and -A are incompatible.
\n
"
);
fprintf
(
stderr
,
"Sorry, -P and -A are incompatible.
\n
"
);
...
...
babeld.h
View file @
03bd8943
...
@@ -84,6 +84,7 @@ extern struct timeval now;
...
@@ -84,6 +84,7 @@ extern struct timeval now;
extern
int
debug
;
extern
int
debug
;
extern
time_t
reboot_time
;
extern
time_t
reboot_time
;
extern
int
wireless_hello_interval
,
wired_hello_interval
;
extern
int
wireless_hello_interval
,
wired_hello_interval
;
extern
int
resend_delay
;
extern
int
link_detect
;
extern
int
link_detect
;
extern
int
all_wireless
;
extern
int
all_wireless
;
extern
int
local_socket
;
extern
int
local_socket
;
...
...
message.c
View file @
03bd8943
...
@@ -1141,17 +1141,10 @@ void
...
@@ -1141,17 +1141,10 @@ void
send_update_resend
(
struct
interface
*
ifp
,
send_update_resend
(
struct
interface
*
ifp
,
const
unsigned
char
*
prefix
,
unsigned
char
plen
)
const
unsigned
char
*
prefix
,
unsigned
char
plen
)
{
{
int
delay
;
assert
(
prefix
!=
NULL
);
assert
(
prefix
!=
NULL
);
send_update
(
ifp
,
1
,
prefix
,
plen
);
send_update
(
ifp
,
1
,
prefix
,
plen
);
record_resend
(
RESEND_UPDATE
,
prefix
,
plen
,
0
,
0
,
NULL
,
resend_delay
);
delay
=
2000
;
delay
=
MIN
(
delay
,
wireless_hello_interval
/
2
);
delay
=
MIN
(
delay
,
wired_hello_interval
/
2
);
delay
=
MAX
(
delay
,
10
);
record_resend
(
RESEND_UPDATE
,
prefix
,
plen
,
0
,
0
,
NULL
,
delay
);
}
}
void
void
...
@@ -1452,19 +1445,13 @@ send_request_resend(struct neighbour *neigh,
...
@@ -1452,19 +1445,13 @@ send_request_resend(struct neighbour *neigh,
const
unsigned
char
*
prefix
,
unsigned
char
plen
,
const
unsigned
char
*
prefix
,
unsigned
char
plen
,
unsigned
short
seqno
,
unsigned
char
*
id
)
unsigned
short
seqno
,
unsigned
char
*
id
)
{
{
int
delay
;
if
(
neigh
)
if
(
neigh
)
send_unicast_multihop_request
(
neigh
,
prefix
,
plen
,
seqno
,
id
,
127
);
send_unicast_multihop_request
(
neigh
,
prefix
,
plen
,
seqno
,
id
,
127
);
else
else
send_multihop_request
(
NULL
,
prefix
,
plen
,
seqno
,
id
,
127
);
send_multihop_request
(
NULL
,
prefix
,
plen
,
seqno
,
id
,
127
);
delay
=
2000
;
delay
=
MIN
(
delay
,
wireless_hello_interval
/
2
);
delay
=
MIN
(
delay
,
wired_hello_interval
/
2
);
delay
=
MAX
(
delay
,
10
);
record_resend
(
RESEND_REQUEST
,
prefix
,
plen
,
seqno
,
id
,
record_resend
(
RESEND_REQUEST
,
prefix
,
plen
,
seqno
,
id
,
neigh
?
neigh
->
ifp
:
NULL
,
delay
);
neigh
?
neigh
->
ifp
:
NULL
,
resend_
delay
);
}
}
void
void
...
...
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