Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos-caddy
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Guillaume Hervier
slapos-caddy
Commits
8d0de1c9
Commit
8d0de1c9
authored
Apr 19, 2013
by
Jondy Zhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No special action for default route;
Remove the old route when add blackhole route;
parent
791bc592
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
5 deletions
+1
-5
component/babeld/kernel_cygwin.c
component/babeld/kernel_cygwin.c
+1
-5
No files found.
component/babeld/kernel_cygwin.c
View file @
8d0de1c9
...
@@ -336,6 +336,7 @@ kernel_route(int operation, const unsigned char *dest, unsigned short plen,
...
@@ -336,6 +336,7 @@ kernel_route(int operation, const unsigned char *dest, unsigned short plen,
if
(
operation
==
ROUTE_MODIFY
)
{
if
(
operation
==
ROUTE_MODIFY
)
{
if
((
metric
==
KERNEL_INFINITY
)
||
if
((
metric
==
KERNEL_INFINITY
)
||
(
newmetric
==
KERNEL_INFINITY
)
||
(
ipv4
&&
plen
==
128
&&
memcmp
(
dest
,
newgate
,
16
)
==
0
))
{
(
ipv4
&&
plen
==
128
&&
memcmp
(
dest
,
newgate
,
16
)
==
0
))
{
kernel_route
(
ROUTE_FLUSH
,
dest
,
plen
,
kernel_route
(
ROUTE_FLUSH
,
dest
,
plen
,
gate
,
ifindex
,
metric
,
gate
,
ifindex
,
metric
,
...
@@ -349,11 +350,6 @@ kernel_route(int operation, const unsigned char *dest, unsigned short plen,
...
@@ -349,11 +350,6 @@ kernel_route(int operation, const unsigned char *dest, unsigned short plen,
ifindex
=
newifindex
;
ifindex
=
newifindex
;
}
}
}
}
/* We don't add/delete a blackhole for default route */
else
if
(
newmetric
==
KERNEL_INFINITY
&&
IN6_IS_ADDR_UNSPECIFIED
(
dest
)
&&
IN6_IS_ADDR_UNSPECIFIED
(
newgate
))
return
0
;
kdebugf
(
"kernel_route: %s %s/%d metric %d dev %d nexthop %s
\n
"
,
kdebugf
(
"kernel_route: %s %s/%d metric %d dev %d nexthop %s
\n
"
,
operation
==
ROUTE_ADD
?
"add"
:
operation
==
ROUTE_ADD
?
"add"
:
...
...
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