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
471115c2
Commit
471115c2
authored
Jun 17, 2007
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Actually refresh external routes when the kernel routes changed.
parent
2ec5bf4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
babel.c
babel.c
+6
-4
No files found.
babel.c
View file @
471115c2
...
...
@@ -72,6 +72,7 @@ int protocol_port;
unsigned
char
protocol_group
[
16
];
int
protocol_socket
=
-
1
;
int
kernel_socket
=
-
1
;
static
int
routes_changed
=
0
;
static
volatile
sig_atomic_t
exiting
=
0
,
dumping
=
0
;
...
...
@@ -407,9 +408,8 @@ main(int argc, char **argv)
if
(
exiting
)
break
;
if
(
kernel_socket
>=
0
&&
FD_ISSET
(
kernel_socket
,
&
readfds
))
{
if
(
kernel_socket
>=
0
&&
FD_ISSET
(
kernel_socket
,
&
readfds
))
kernel_callback
(
kernel_routes_changed
,
NULL
);
}
if
(
FD_ISSET
(
protocol_socket
,
&
readfds
))
{
rc
=
babel_recv
(
protocol_socket
,
buf
,
maxmtu
,
...
...
@@ -431,8 +431,9 @@ main(int argc, char **argv)
}
}
if
(
now
.
tv_sec
>=
expiry_time
)
{
if
(
routes_changed
||
now
.
tv_sec
>=
expiry_time
)
{
expire_routes
();
routes_changed
=
0
;
expiry_time
=
now
.
tv_sec
+
20
+
random
()
%
20
;
}
...
...
@@ -624,7 +625,8 @@ dump_tables(FILE *out)
static
int
kernel_routes_changed
(
void
*
closure
)
{
return
0
;
routes_changed
=
1
;
return
1
;
}
struct
network
*
...
...
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