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
315973de
Commit
315973de
authored
Mar 16, 2008
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Send updates from check_xroutes.
This ensures that retractions are sent too.
parent
5f256663
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
babel.c
babel.c
+3
-5
xroute.c
xroute.c
+5
-1
xroute.h
xroute.h
+1
-3
No files found.
babel.c
View file @
315973de
...
@@ -503,7 +503,7 @@ main(int argc, char **argv)
...
@@ -503,7 +503,7 @@ main(int argc, char **argv)
if
(
receive_buffer
==
NULL
)
if
(
receive_buffer
==
NULL
)
goto
fail
;
goto
fail
;
}
}
check_xroutes
();
check_xroutes
(
0
);
kernel_routes_changed
=
0
;
kernel_routes_changed
=
0
;
kernel_link_changed
=
0
;
kernel_link_changed
=
0
;
kernel_addr_changed
=
0
;
kernel_addr_changed
=
0
;
...
@@ -617,10 +617,8 @@ main(int argc, char **argv)
...
@@ -617,10 +617,8 @@ main(int argc, char **argv)
if
(
kernel_routes_changed
||
kernel_addr_changed
||
if
(
kernel_routes_changed
||
kernel_addr_changed
||
now
.
tv_sec
>=
kernel_dump_time
)
{
now
.
tv_sec
>=
kernel_dump_time
)
{
rc
=
check_xroutes
();
rc
=
check_xroutes
(
1
);
if
(
rc
>
0
)
if
(
rc
<
0
)
send_self_update
(
NULL
,
1
);
else
if
(
rc
<
0
)
fprintf
(
stderr
,
"Warning: couldn't check exported routes.
\n
"
);
fprintf
(
stderr
,
"Warning: couldn't check exported routes.
\n
"
);
kernel_routes_changed
=
kernel_addr_changed
=
0
;
kernel_routes_changed
=
kernel_addr_changed
=
0
;
if
(
kernel_socket
>=
0
)
if
(
kernel_socket
>=
0
)
...
...
xroute.c
View file @
315973de
...
@@ -99,7 +99,7 @@ add_xroute(int kind, unsigned char prefix[16], unsigned char plen,
...
@@ -99,7 +99,7 @@ add_xroute(int kind, unsigned char prefix[16], unsigned char plen,
}
}
int
int
check_xroutes
()
check_xroutes
(
int
send_updates
)
{
{
int
i
,
j
,
metric
,
export
,
change
=
0
,
rc
;
int
i
,
j
,
metric
,
export
,
change
=
0
,
rc
;
struct
kernel_route
routes
[
240
];
struct
kernel_route
routes
[
240
];
...
@@ -159,6 +159,8 @@ check_xroutes()
...
@@ -159,6 +159,8 @@ check_xroutes()
if
(
!
export
)
{
if
(
!
export
)
{
flush_xroute
(
&
xroutes
[
i
]);
flush_xroute
(
&
xroutes
[
i
]);
if
(
send_updates
)
send_update
(
NULL
,
1
,
xroutes
[
i
].
prefix
,
xroutes
[
i
].
plen
);
change
=
1
;
change
=
1
;
}
else
{
}
else
{
i
++
;
i
++
;
...
@@ -180,6 +182,8 @@ check_xroutes()
...
@@ -180,6 +182,8 @@ check_xroutes()
metric
,
routes
[
i
].
ifindex
,
routes
[
i
].
proto
);
metric
,
routes
[
i
].
ifindex
,
routes
[
i
].
proto
);
if
(
rc
)
if
(
rc
)
change
=
1
;
change
=
1
;
if
(
send_updates
)
send_update
(
NULL
,
1
,
xroutes
[
i
].
prefix
,
xroutes
[
i
].
plen
);
}
}
}
}
return
change
;
return
change
;
...
...
xroute.h
View file @
315973de
...
@@ -20,8 +20,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
...
@@ -20,8 +20,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
THE SOFTWARE.
*/
*/
int
check_xroutes
(
void
);
/* These should come in decreasing order of priority. */
/* These should come in decreasing order of priority. */
#define XROUTE_FORCED 1
#define XROUTE_FORCED 1
...
@@ -42,4 +40,4 @@ extern int numxroutes;
...
@@ -42,4 +40,4 @@ extern int numxroutes;
struct
xroute
*
find_xroute
(
const
unsigned
char
*
prefix
,
unsigned
char
plen
);
struct
xroute
*
find_xroute
(
const
unsigned
char
*
prefix
,
unsigned
char
plen
);
int
add_xroute
(
int
kind
,
unsigned
char
prefix
[
16
],
unsigned
char
plen
,
int
add_xroute
(
int
kind
,
unsigned
char
prefix
[
16
],
unsigned
char
plen
,
unsigned
short
metric
,
unsigned
int
ifindex
,
int
proto
);
unsigned
short
metric
,
unsigned
int
ifindex
,
int
proto
);
int
check_xroutes
(
void
);
int
check_xroutes
(
int
send_updates
);
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