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
6e4b3d91
Commit
6e4b3d91
authored
Aug 19, 2007
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix handling of hellos in case of link outage.
parent
a0ee038c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
neighbour.c
neighbour.c
+15
-6
No files found.
neighbour.c
View file @
6e4b3d91
...
@@ -125,8 +125,9 @@ update_neighbour(struct neighbour *neigh, int hello, int hello_interval)
...
@@ -125,8 +125,9 @@ update_neighbour(struct neighbour *neigh, int hello, int hello_interval)
if
(
hello
<
0
)
{
if
(
hello
<
0
)
{
if
(
neigh
->
hello_interval
<=
0
)
if
(
neigh
->
hello_interval
<=
0
)
return
rc
;
return
rc
;
missed_hellos
=
(
timeval_minus_msec
(
&
now
,
&
neigh
->
hello_time
)
-
missed_hellos
=
neigh
->
hello_interval
*
6
)
/
(
timeval_minus_msec
(
&
now
,
&
neigh
->
hello_time
)
-
neigh
->
hello_interval
*
7
)
/
(
neigh
->
hello_interval
*
10
);
(
neigh
->
hello_interval
*
10
);
if
(
missed_hellos
<=
0
)
if
(
missed_hellos
<=
0
)
return
rc
;
return
rc
;
...
@@ -136,10 +137,17 @@ update_neighbour(struct neighbour *neigh, int hello, int hello_interval)
...
@@ -136,10 +137,17 @@ update_neighbour(struct neighbour *neigh, int hello, int hello_interval)
if
(
neigh
->
hello_seqno
>=
0
&&
neigh
->
reach
>
0
)
{
if
(
neigh
->
hello_seqno
>=
0
&&
neigh
->
reach
>
0
)
{
missed_hellos
=
seqno_minus
(
hello
,
neigh
->
hello_seqno
)
-
1
;
missed_hellos
=
seqno_minus
(
hello
,
neigh
->
hello_seqno
)
-
1
;
if
(
missed_hellos
<
0
)
{
if
(
missed_hellos
<
0
)
{
/* This neighbour has increased its hello interval, and we
if
(
hello_interval
>
neigh
->
hello_interval
)
{
didn't notice. */
/* This neighbour has increased its hello interval,
neigh
->
reach
<<=
-
missed_hellos
;
and we didn't notice. */
missed_hellos
=
0
;
neigh
->
reach
<<=
-
missed_hellos
;
missed_hellos
=
0
;
}
else
{
/* Late hello. Probably due to the link layer buffering
packets during a link outage. Ignore it. */
hello
=
0
;
missed_hellos
=
0
;
}
rc
=
1
;
rc
=
1
;
}
}
}
else
{
}
else
{
...
@@ -151,6 +159,7 @@ update_neighbour(struct neighbour *neigh, int hello, int hello_interval)
...
@@ -151,6 +159,7 @@ update_neighbour(struct neighbour *neigh, int hello, int hello_interval)
if
(
missed_hellos
>
0
)
{
if
(
missed_hellos
>
0
)
{
neigh
->
reach
>>=
missed_hellos
;
neigh
->
reach
>>=
missed_hellos
;
neigh
->
hello_seqno
=
(
neigh
->
hello_seqno
+
missed_hellos
)
&
0xFFFF
;
missed_hellos
=
0
;
missed_hellos
=
0
;
rc
=
1
;
rc
=
1
;
}
}
...
...
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