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
0673b965
Commit
0673b965
authored
May 27, 2013
by
Matthieu Boutier
Committed by
Juliusz Chroboczek
Jul 24, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add local interface source-specific printing.
It also update the route's id.
parent
56755718
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
local.c
local.c
+14
-9
No files found.
local.c
View file @
0673b965
...
@@ -185,12 +185,14 @@ local_notify_xroute_1(int s, struct xroute *xroute, int kind)
...
@@ -185,12 +185,14 @@ local_notify_xroute_1(int s, struct xroute *xroute, int kind)
{
{
char
buf
[
512
];
char
buf
[
512
];
int
rc
;
int
rc
;
const
char
*
dst_prefix
=
format_prefix
(
xroute
->
prefix
,
xroute
->
plen
);
const
char
*
src_prefix
=
format_prefix
(
xroute
->
src_prefix
,
xroute
->
src_plen
);
rc
=
snprintf
(
buf
,
512
,
"%s xroute %s prefix %s metric %d
\n
"
,
rc
=
snprintf
(
buf
,
512
,
"%s xroute %s-%s prefix %s from %s metric %d
\n
"
,
local_kind
(
kind
),
local_kind
(
kind
),
dst_prefix
,
src_prefix
,
format_prefix
(
xroute
->
prefix
,
xroute
->
plen
),
dst_prefix
,
src_prefix
,
xroute
->
metric
);
format_prefix
(
xroute
->
prefix
,
xroute
->
plen
),
xroute
->
metric
);
if
(
rc
<
0
||
rc
>=
512
)
if
(
rc
<
0
||
rc
>=
512
)
goto
fail
;
goto
fail
;
...
@@ -218,14 +220,17 @@ local_notify_route_1(int s, struct babel_route *route, int kind)
...
@@ -218,14 +220,17 @@ local_notify_route_1(int s, struct babel_route *route, int kind)
{
{
char
buf
[
512
];
char
buf
[
512
];
int
rc
;
int
rc
;
const
char
*
dst_prefix
=
format_prefix
(
route
->
src
->
prefix
,
route
->
src
->
plen
);
const
char
*
src_prefix
=
format_prefix
(
route
->
src
->
src_prefix
,
route
->
src
->
src_plen
);
rc
=
snprintf
(
buf
,
512
,
rc
=
snprintf
(
buf
,
512
,
"%s route %s-%lx
prefix
%s installed %s "
"%s route %s-%lx
-%s prefix %s from
%s installed %s "
"id %s metric %d refmetric %d via %s if %s
\n
"
,
"id %s metric %d refmetric %d via %s if %s
\n
"
,
local_kind
(
kind
),
local_kind
(
kind
),
format_prefix
(
route
->
src
->
prefix
,
route
->
src
->
plen
),
dst_prefix
,
(
unsigned
long
)
route
->
neigh
,
src_prefix
,
(
unsigned
long
)
route
->
neigh
,
dst_prefix
,
src_prefix
,
format_prefix
(
route
->
src
->
prefix
,
route
->
src
->
plen
),
route
->
installed
?
"yes"
:
"no"
,
route
->
installed
?
"yes"
:
"no"
,
format_eui64
(
route
->
src
->
id
),
format_eui64
(
route
->
src
->
id
),
route_metric
(
route
),
route
->
refmetric
,
route_metric
(
route
),
route
->
refmetric
,
...
...
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