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
28e0d58f
Commit
28e0d58f
authored
Mar 31, 2008
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Local notification for routes.
parent
d13920e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
route.c
route.c
+8
-0
No files found.
route.c
View file @
28e0d58f
...
@@ -37,6 +37,7 @@ THE SOFTWARE.
...
@@ -37,6 +37,7 @@ THE SOFTWARE.
#include "message.h"
#include "message.h"
#include "resend.h"
#include "resend.h"
#include "filter.h"
#include "filter.h"
#include "local.h"
struct
route
*
routes
=
NULL
;
struct
route
*
routes
=
NULL
;
int
numroutes
=
0
,
maxroutes
=
0
;
int
numroutes
=
0
,
maxroutes
=
0
;
...
@@ -86,6 +87,8 @@ flush_route(struct route *route)
...
@@ -86,6 +87,8 @@ flush_route(struct route *route)
lost
=
1
;
lost
=
1
;
}
}
local_notify_route
(
route
,
1
);
src
=
route
->
src
;
src
=
route
->
src
;
if
(
n
!=
numroutes
-
1
)
if
(
n
!=
numroutes
-
1
)
...
@@ -155,6 +158,7 @@ install_route(struct route *route)
...
@@ -155,6 +158,7 @@ install_route(struct route *route)
return
;
return
;
}
}
route
->
installed
=
1
;
route
->
installed
=
1
;
local_notify_route
(
route
,
0
);
}
}
void
void
...
@@ -173,6 +177,7 @@ uninstall_route(struct route *route)
...
@@ -173,6 +177,7 @@ uninstall_route(struct route *route)
perror
(
"kernel_route(FLUSH)"
);
perror
(
"kernel_route(FLUSH)"
);
route
->
installed
=
0
;
route
->
installed
=
0
;
local_notify_route
(
route
,
0
);
}
}
/* This is equivalent to uninstall_route followed with install_route,
/* This is equivalent to uninstall_route followed with install_route,
...
@@ -201,6 +206,8 @@ switch_routes(struct route *old, struct route *new)
...
@@ -201,6 +206,8 @@ switch_routes(struct route *old, struct route *new)
old
->
installed
=
0
;
old
->
installed
=
0
;
new
->
installed
=
1
;
new
->
installed
=
1
;
}
}
local_notify_route
(
old
,
0
);
local_notify_route
(
new
,
0
);
}
}
void
void
...
@@ -226,6 +233,7 @@ change_route_metric(struct route *route, int newmetric)
...
@@ -226,6 +233,7 @@ change_route_metric(struct route *route, int newmetric)
}
}
}
}
route
->
metric
=
newmetric
;
route
->
metric
=
newmetric
;
local_notify_route
(
route
,
0
);
}
}
int
int
...
...
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