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
4a0308bf
Commit
4a0308bf
authored
Oct 16, 2011
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename parameters of update_prefix.
parent
08dc83bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
route.c
route.c
+8
-7
route.h
route.h
+2
-2
No files found.
route.c
View file @
4a0308bf
...
@@ -653,7 +653,8 @@ update_interface_metric(struct interface *ifp)
...
@@ -653,7 +653,8 @@ update_interface_metric(struct interface *ifp)
/* This is called whenever we receive an update. */
/* This is called whenever we receive an update. */
struct
route
*
struct
route
*
update_route
(
const
unsigned
char
*
a
,
const
unsigned
char
*
p
,
unsigned
char
plen
,
update_route
(
const
unsigned
char
*
id
,
const
unsigned
char
*
prefix
,
unsigned
char
plen
,
unsigned
short
seqno
,
unsigned
short
refmetric
,
unsigned
short
seqno
,
unsigned
short
refmetric
,
unsigned
short
interval
,
unsigned
short
interval
,
struct
neighbour
*
neigh
,
const
unsigned
char
*
nexthop
,
struct
neighbour
*
neigh
,
const
unsigned
char
*
nexthop
,
...
@@ -665,26 +666,26 @@ update_route(const unsigned char *a, const unsigned char *p, unsigned char plen,
...
@@ -665,26 +666,26 @@ update_route(const unsigned char *a, const unsigned char *p, unsigned char plen,
int
add_metric
;
int
add_metric
;
int
hold_time
=
MAX
((
4
*
interval
)
/
100
+
interval
/
50
,
15
);
int
hold_time
=
MAX
((
4
*
interval
)
/
100
+
interval
/
50
,
15
);
if
(
memcmp
(
a
,
myid
,
8
)
==
0
)
if
(
memcmp
(
id
,
myid
,
8
)
==
0
)
return
NULL
;
return
NULL
;
if
(
martian_prefix
(
p
,
plen
))
{
if
(
martian_prefix
(
p
refix
,
plen
))
{
fprintf
(
stderr
,
"Rejecting martian route to %s through %s.
\n
"
,
fprintf
(
stderr
,
"Rejecting martian route to %s through %s.
\n
"
,
format_prefix
(
p
,
plen
),
format_address
(
a
));
format_prefix
(
p
refix
,
plen
),
format_address
(
id
));
return
NULL
;
return
NULL
;
}
}
add_metric
=
input_filter
(
a
,
p
,
plen
,
add_metric
=
input_filter
(
id
,
prefix
,
plen
,
neigh
->
address
,
neigh
->
ifp
->
ifindex
);
neigh
->
address
,
neigh
->
ifp
->
ifindex
);
if
(
add_metric
>=
INFINITY
)
if
(
add_metric
>=
INFINITY
)
return
NULL
;
return
NULL
;
src
=
find_source
(
a
,
p
,
plen
,
1
,
seqno
);
src
=
find_source
(
id
,
prefix
,
plen
,
1
,
seqno
);
if
(
src
==
NULL
)
if
(
src
==
NULL
)
return
NULL
;
return
NULL
;
feasible
=
update_feasible
(
src
,
seqno
,
refmetric
);
feasible
=
update_feasible
(
src
,
seqno
,
refmetric
);
route
=
find_route
(
p
,
plen
,
neigh
,
nexthop
);
route
=
find_route
(
p
refix
,
plen
,
neigh
,
nexthop
);
metric
=
MIN
((
int
)
refmetric
+
neighbour_cost
(
neigh
)
+
add_metric
,
INFINITY
);
metric
=
MIN
((
int
)
refmetric
+
neighbour_cost
(
neigh
)
+
add_metric
,
INFINITY
);
if
(
route
)
{
if
(
route
)
{
struct
source
*
oldsrc
;
struct
source
*
oldsrc
;
...
...
route.h
View file @
4a0308bf
...
@@ -91,8 +91,8 @@ struct route *install_best_route(const unsigned char prefix[16],
...
@@ -91,8 +91,8 @@ struct route *install_best_route(const unsigned char prefix[16],
void
update_neighbour_metric
(
struct
neighbour
*
neigh
,
int
changed
);
void
update_neighbour_metric
(
struct
neighbour
*
neigh
,
int
changed
);
void
update_interface_metric
(
struct
interface
*
ifp
);
void
update_interface_metric
(
struct
interface
*
ifp
);
void
update_route_metric
(
struct
route
*
route
);
void
update_route_metric
(
struct
route
*
route
);
struct
route
*
update_route
(
const
unsigned
char
*
a
,
struct
route
*
update_route
(
const
unsigned
char
*
id
,
const
unsigned
char
*
p
,
unsigned
char
plen
,
const
unsigned
char
*
p
refix
,
unsigned
char
plen
,
unsigned
short
seqno
,
unsigned
short
refmetric
,
unsigned
short
seqno
,
unsigned
short
refmetric
,
unsigned
short
interval
,
struct
neighbour
*
neigh
,
unsigned
short
interval
,
struct
neighbour
*
neigh
,
const
unsigned
char
*
nexthop
,
const
unsigned
char
*
nexthop
,
...
...
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