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
856bb832
Commit
856bb832
authored
Oct 08, 2011
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix route expiration routines to avoid crash in edge case.
Reported by Dave Taht.
parent
0585047f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
route.c
route.c
+15
-6
No files found.
route.c
View file @
856bb832
...
...
@@ -260,9 +260,9 @@ flush_neighbour_routes(struct neighbour *neigh)
{
int
i
;
for
(
i
=
0
;
i
<
route_slots
;
i
++
)
{
i
=
0
;
while
(
i
<
route_slots
)
{
struct
route
*
r
;
again:
r
=
routes
[
i
];
while
(
r
)
{
if
(
r
->
neigh
==
neigh
)
{
...
...
@@ -271,6 +271,9 @@ flush_neighbour_routes(struct neighbour *neigh)
}
r
=
r
->
next
;
}
i
++
;
again:
;
}
}
...
...
@@ -279,9 +282,9 @@ flush_interface_routes(struct interface *ifp, int v4only)
{
int
i
;
for
(
i
=
0
;
i
<
route_slots
;
i
++
)
{
i
=
0
;
while
(
i
<
route_slots
)
{
struct
route
*
r
;
again:
r
=
routes
[
i
];
while
(
r
)
{
if
(
r
->
neigh
->
ifp
==
ifp
&&
...
...
@@ -291,6 +294,9 @@ flush_interface_routes(struct interface *ifp, int v4only)
}
r
=
r
->
next
;
}
i
++
;
again:
;
}
}
...
...
@@ -983,8 +989,8 @@ expire_routes(void)
debugf
(
"Expiring old routes.
\n
"
);
for
(
i
=
0
;
i
<
route_slots
;
i
++
)
{
again:
i
=
0
;
while
(
i
<
route_slots
)
{
r
=
routes
[
i
];
while
(
r
)
{
/* Protect against clock being stepped. */
...
...
@@ -1003,5 +1009,8 @@ expire_routes(void)
}
r
=
r
->
next
;
}
i
++
;
again:
;
}
}
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