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
13530463
Commit
13530463
authored
Aug 11, 2014
by
Matthieu Boutier
Committed by
Juliusz Chroboczek
Mar 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement source-specific updates.
parent
938e166f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
interface.h
interface.h
+1
-0
message.c
message.c
+12
-2
No files found.
interface.h
View file @
13530463
...
...
@@ -96,6 +96,7 @@ struct interface {
time_t
bucket_time
;
unsigned
int
bucket
;
time_t
last_update_time
;
time_t
last_specific_update_time
;
unsigned
short
hello_seqno
;
unsigned
hello_interval
;
unsigned
update_interval
;
...
...
message.c
View file @
13530463
...
...
@@ -1488,6 +1488,9 @@ buffer_update(struct interface *ifp,
ifp
->
num_buffered_updates
++
;
}
/* Full wildcard update with prefix == src_prefix == NULL,
Standard wildcard update with prefix == NULL && src_prefix != NULL,
Specific wildcard update with prefix != NULL && src_prefix == NULL. */
void
send_update
(
struct
interface
*
ifp
,
int
urgent
,
const
unsigned
char
*
prefix
,
unsigned
char
plen
,
...
...
@@ -1512,12 +1515,12 @@ send_update(struct interface *ifp, int urgent,
if
(
!
if_up
(
ifp
))
return
;
if
(
prefix
)
{
if
(
prefix
&&
src_prefix
)
{
debugf
(
"Sending update to %s for %s from %s.
\n
"
,
ifp
->
name
,
format_prefix
(
prefix
,
plen
),
format_prefix
(
src_prefix
,
src_plen
));
buffer_update
(
ifp
,
prefix
,
plen
,
src_prefix
,
src_plen
);
}
else
{
}
else
if
(
prefix
||
src_prefix
)
{
struct
route_stream
*
routes
;
send_self_update
(
ifp
);
debugf
(
"Sending update to %s for any.
\n
"
,
ifp
->
name
);
...
...
@@ -1527,6 +1530,9 @@ send_update(struct interface *ifp, int urgent,
struct
babel_route
*
route
=
route_stream_next
(
routes
);
if
(
route
==
NULL
)
break
;
if
((
src_prefix
&&
route
->
src
->
src_plen
!=
0
)
||
(
prefix
&&
route
->
src
->
src_plen
==
0
))
continue
;
buffer_update
(
ifp
,
route
->
src
->
prefix
,
route
->
src
->
plen
,
route
->
src
->
src_prefix
,
route
->
src
->
src_plen
);
}
...
...
@@ -1536,6 +1542,10 @@ send_update(struct interface *ifp, int urgent,
}
set_timeout
(
&
ifp
->
update_timeout
,
ifp
->
update_interval
);
ifp
->
last_update_time
=
now
.
tv_sec
;
ifp
->
last_specific_update_time
=
now
.
tv_sec
;
}
else
{
send_update
(
ifp
,
urgent
,
NULL
,
0
,
zeroes
,
0
);
send_update
(
ifp
,
urgent
,
zeroes
,
0
,
NULL
,
0
);
}
schedule_update_flush
(
ifp
,
urgent
);
}
...
...
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