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
917e8722
Commit
917e8722
authored
Nov 02, 2008
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Maintaine update_flush_timeout per-interface.
parent
51e4a64e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
16 deletions
+12
-16
babel.c
babel.c
+3
-6
message.c
message.c
+7
-8
message.h
message.h
+0
-1
network.h
network.h
+2
-1
No files found.
babel.c
View file @
917e8722
...
...
@@ -538,8 +538,8 @@ main(int argc, char **argv)
timeval_min
(
&
tv
,
&
net
->
hello_timeout
);
timeval_min
(
&
tv
,
&
net
->
self_update_timeout
);
timeval_min
(
&
tv
,
&
net
->
update_timeout
);
timeval_min
(
&
tv
,
&
net
->
update_flush_timeout
);
}
timeval_min
(
&
tv
,
&
update_flush_timeout
);
timeval_min
(
&
tv
,
&
unicast_flush_timeout
);
FD_ZERO
(
&
readfds
);
if
(
timeval_compare
(
&
tv
,
&
now
)
>
0
)
{
...
...
@@ -688,6 +688,8 @@ main(int argc, char **argv)
send_update
(
net
,
0
,
NULL
,
0
);
if
(
timeval_compare
(
&
now
,
&
net
->
self_update_timeout
)
>=
0
)
send_self_update
(
net
,
0
);
if
(
timeval_compare
(
&
now
,
&
net
->
update_flush_timeout
)
>=
0
)
flushupdates
(
net
);
}
if
(
resend_time
.
tv_sec
!=
0
)
{
...
...
@@ -695,11 +697,6 @@ main(int argc, char **argv)
do_resend
();
}
if
(
update_flush_timeout
.
tv_sec
!=
0
)
{
if
(
timeval_compare
(
&
now
,
&
update_flush_timeout
)
>=
0
)
flushupdates
(
NULL
);
}
if
(
unicast_flush_timeout
.
tv_sec
!=
0
)
{
if
(
timeval_compare
(
&
now
,
&
unicast_flush_timeout
)
>=
0
)
flush_unicast
(
1
);
...
...
message.c
View file @
917e8722
...
...
@@ -40,8 +40,6 @@ THE SOFTWARE.
#include "filter.h"
#include "kernel.h"
struct
timeval
update_flush_timeout
=
{
0
,
0
};
unsigned
char
packet_header
[
4
]
=
{
42
,
2
};
int
parasitic
=
0
;
...
...
@@ -917,8 +915,8 @@ flushupdates(struct network *net)
done:
free
(
b
);
}
update_flush_timeout
.
tv_sec
=
0
;
update_flush_timeout
.
tv_usec
=
0
;
net
->
update_flush_timeout
.
tv_sec
=
0
;
net
->
update_flush_timeout
.
tv_usec
=
0
;
}
static
void
...
...
@@ -926,11 +924,12 @@ schedule_update_flush(struct network *net, int urgent)
{
unsigned
msecs
;
msecs
=
update_jitter
(
net
,
urgent
);
if
(
update_flush_timeout
.
tv_sec
!=
0
&&
timeval_minus_msec
(
&
update_flush_timeout
,
&
now
)
<
msecs
)
if
(
net
->
update_flush_timeout
.
tv_sec
!=
0
&&
timeval_minus_msec
(
&
net
->
update_flush_timeout
,
&
now
)
<
msecs
)
return
;
update_flush_timeout
.
tv_usec
=
(
now
.
tv_usec
+
msecs
*
1000
)
%
1000000
;
update_flush_timeout
.
tv_sec
=
net
->
update_flush_timeout
.
tv_usec
=
(
now
.
tv_usec
+
msecs
*
1000
)
%
1000000
;
net
->
update_flush_timeout
.
tv_sec
=
now
.
tv_sec
+
(
now
.
tv_usec
/
1000
+
msecs
)
/
1000
;
}
...
...
message.h
View file @
917e8722
...
...
@@ -47,7 +47,6 @@ extern int silent_time;
extern
int
broadcast_ihu
;
extern
int
split_horizon
;
extern
struct
timeval
update_flush_timeout
;
extern
unsigned
char
packet_header
[
4
];
extern
struct
neighbour
*
unicast_neighbour
;
...
...
network.h
View file @
917e8722
...
...
@@ -36,12 +36,13 @@ struct network {
struct
timeval
hello_timeout
;
struct
timeval
self_update_timeout
;
struct
timeval
update_timeout
;
struct
timeval
flush_timeout
;
struct
timeval
update_flush_timeout
;
char
ifname
[
IF_NAMESIZE
];
unsigned
char
*
ipv4
;
int
numll
;
unsigned
char
(
*
ll
)[
16
];
int
buffered
;
struct
timeval
flush_timeout
;
int
bufsize
;
char
have_buffered_hello
;
char
have_buffered_id
;
...
...
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