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
7cf10f8d
Commit
7cf10f8d
authored
Mar 31, 2008
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Local notification for neighbours.
parent
e5bbae14
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
neighbour.c
neighbour.c
+13
-0
No files found.
neighbour.c
View file @
7cf10f8d
...
...
@@ -33,6 +33,7 @@ THE SOFTWARE.
#include "source.h"
#include "route.h"
#include "message.h"
#include "local.h"
struct
neighbour
*
neighs
=
NULL
;
...
...
@@ -65,6 +66,15 @@ flush_neighbour(struct neighbour *neigh)
flush_neighbour_routes
(
neigh
);
if
(
unicast_neighbour
==
neigh
)
flush_unicast
(
1
);
memset
(
neigh
,
0
,
sizeof
(
*
neigh
));
VALGRIND_MAKE_MEM_UNDEFINED
(
neigh
,
sizeof
(
*
neigh
));
neigh
->
hello_seqno
=
-
2
;
while
(
numneighs
>
0
&&
!
neighbour_valid
(
&
neighs
[
numneighs
-
1
]))
{
numneighs
--
;
VALGRIND_MAKE_MEM_UNDEFINED
(
&
neighs
[
numneighs
],
sizeof
(
neighs
[
numneighs
]));
}
}
if
(
neighs
==
neigh
)
{
neighs
=
neigh
->
next
;
...
...
@@ -226,6 +236,8 @@ update_neighbour(struct neighbour *neigh, int hello, int hello_interval)
if
(
!
route
||
route
->
metric
>=
INFINITY
||
route
->
neigh
==
neigh
)
send_unicast_request
(
neigh
,
NULL
,
0
,
0
,
0
,
0
);
}
if
(
rc
)
local_notify_neighbour
(
neigh
,
0
);
return
rc
;
}
...
...
@@ -245,6 +257,7 @@ reset_txcost(struct neighbour *neigh)
delay
>=
neigh
->
ihu_interval
*
10
*
10
))
{
neigh
->
txcost
=
INFINITY
;
neigh
->
ihu_time
=
now
;
local_notify_neighbour
(
neigh
,
0
);
return
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