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
ebaa1afd
Commit
ebaa1afd
authored
Mar 16, 2008
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rewrite send_update.
parent
649ffa50
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
21 deletions
+17
-21
message.c
message.c
+17
-21
No files found.
message.c
View file @
ebaa1afd
...
@@ -737,7 +737,7 @@ void
...
@@ -737,7 +737,7 @@ void
send_update
(
struct
network
*
net
,
int
urgent
,
send_update
(
struct
network
*
net
,
int
urgent
,
const
unsigned
char
*
prefix
,
unsigned
char
plen
)
const
unsigned
char
*
prefix
,
unsigned
char
plen
)
{
{
int
i
;
int
i
,
selfonly
;
struct
request
*
request
;
struct
request
*
request
;
if
(
prefix
)
{
if
(
prefix
)
{
...
@@ -758,8 +758,6 @@ send_update(struct network *net, int urgent,
...
@@ -758,8 +758,6 @@ send_update(struct network *net, int urgent,
if
(
net
==
NULL
)
{
if
(
net
==
NULL
)
{
for
(
i
=
0
;
i
<
numnets
;
i
++
)
{
for
(
i
=
0
;
i
<
numnets
;
i
++
)
{
send_update
(
&
nets
[
i
],
urgent
,
prefix
,
plen
);
send_update
(
&
nets
[
i
],
urgent
,
prefix
,
plen
);
if
(
!
nets
[
i
].
up
)
continue
;
}
}
return
;
return
;
}
}
...
@@ -767,17 +765,10 @@ send_update(struct network *net, int urgent,
...
@@ -767,17 +765,10 @@ send_update(struct network *net, int urgent,
if
(
!
net
->
up
)
if
(
!
net
->
up
)
return
;
return
;
if
(
parasitic
||
(
silent_time
&&
now
.
tv_sec
<
reboot_time
+
silent_time
))
{
selfonly
=
if
(
prefix
==
NULL
)
{
parasitic
||
(
silent_time
&&
now
.
tv_sec
<
reboot_time
+
silent_time
);
send_self_update
(
net
,
0
);
delay_jitter
(
&
net
->
update_time
,
&
net
->
update_timeout
,
update_interval
);
}
else
if
(
find_xroute
(
prefix
,
plen
))
{
buffer_update
(
net
,
prefix
,
plen
);
}
return
;
}
if
(
!
selfonly
)
silent_time
=
0
;
silent_time
=
0
;
if
(
prefix
)
{
if
(
prefix
)
{
...
@@ -785,19 +776,24 @@ send_update(struct network *net, int urgent,
...
@@ -785,19 +776,24 @@ send_update(struct network *net, int urgent,
/* Update won't fit in current packet */
/* Update won't fit in current packet */
flushupdates
();
flushupdates
();
}
}
if
(
!
selfonly
||
find_xroute
(
prefix
,
plen
))
{
debugf
(
"Sending update to %s for %s.
\n
"
,
debugf
(
"Sending update to %s for %s.
\n
"
,
net
->
ifname
,
format_prefix
(
prefix
,
plen
));
net
->
ifname
,
format_prefix
(
prefix
,
plen
));
buffer_update
(
net
,
prefix
,
plen
);
buffer_update
(
net
,
prefix
,
plen
);
}
}
else
{
}
else
{
send_self_update
(
net
,
0
);
send_self_update
(
net
,
0
);
/* Don't send full route dumps more than ten times per second */
/* Don't send full route dumps more than ten times per second */
if
(
net
->
update_time
.
tv_sec
>
0
&&
if
(
net
->
update_time
.
tv_sec
>
0
&&
timeval_minus_msec
(
&
now
,
&
net
->
update_time
)
<
100
)
timeval_minus_msec
(
&
now
,
&
net
->
update_time
)
<
100
)
return
;
return
;
if
(
!
selfonly
)
{
debugf
(
"Sending update to %s for any.
\n
"
,
net
->
ifname
);
debugf
(
"Sending update to %s for any.
\n
"
,
net
->
ifname
);
for
(
i
=
0
;
i
<
numroutes
;
i
++
)
for
(
i
=
0
;
i
<
numroutes
;
i
++
)
if
(
routes
[
i
].
installed
)
if
(
routes
[
i
].
installed
)
buffer_update
(
net
,
routes
[
i
].
src
->
prefix
,
routes
[
i
].
src
->
plen
);
buffer_update
(
net
,
routes
[
i
].
src
->
prefix
,
routes
[
i
].
src
->
plen
);
}
delay_jitter
(
&
net
->
update_time
,
&
net
->
update_timeout
,
delay_jitter
(
&
net
->
update_time
,
&
net
->
update_timeout
,
update_interval
);
update_interval
);
}
}
...
...
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