Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
labs
BIRD Internet Routing Daemon
Commits
738a57b6
Commit
738a57b6
authored
Oct 25, 2017
by
Ondřej Zajíček
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Babel: Fix hello timeout for short hello intervals
parent
b47eaefe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
proto/babel/babel.c
proto/babel/babel.c
+9
-5
No files found.
proto/babel/babel.c
View file @
738a57b6
...
...
@@ -355,21 +355,25 @@ babel_expire_ihu(struct babel_proto *p, struct babel_neighbor *nbr)
}
static
void
babel_expire_hello
(
struct
babel_proto
*
p
,
struct
babel_neighbor
*
nbr
)
babel_expire_hello
(
struct
babel_proto
*
p
,
struct
babel_neighbor
*
nbr
,
btime
now_
)
{
again:
nbr
->
hello_map
<<=
1
;
if
(
nbr
->
hello_cnt
<
16
)
nbr
->
hello_cnt
++
;
nbr
->
hello_expiry
+=
nbr
->
last_hello_int
;
/* We may expire multiple hellos if last_hello_int is too short */
if
(
nbr
->
hello_map
&&
nbr
->
hello_expiry
<=
now_
)
goto
again
;
TRACE
(
D_EVENTS
,
"Hello from nbr %I on %s expired, %d left"
,
nbr
->
addr
,
nbr
->
ifa
->
iface
->
name
,
u32_popcount
(
nbr
->
hello_map
));
if
(
nbr
->
hello_map
)
{
nbr
->
hello_expiry
+=
nbr
->
last_hello_int
;
babel_update_cost
(
nbr
);
}
else
babel_flush_neighbor
(
p
,
nbr
);
}
...
...
@@ -389,7 +393,7 @@ babel_expire_neighbors(struct babel_proto *p)
babel_expire_ihu
(
p
,
nbr
);
if
(
nbr
->
hello_expiry
&&
nbr
->
hello_expiry
<=
now_
)
babel_expire_hello
(
p
,
nbr
);
babel_expire_hello
(
p
,
nbr
,
now_
);
}
}
}
...
...
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