Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BIRD Internet Routing Daemon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
labs
BIRD Internet Routing Daemon
Commits
ace3072e
Commit
ace3072e
authored
Jan 23, 2018
by
Ondřej Zajíček
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KRT: Fix option 'merge paths'
parent
e5ff7929
Pipeline
#32195
passed with stages
in 4 minutes and 20 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
12 deletions
+10
-12
sysdep/unix/krt.Y
sysdep/unix/krt.Y
+1
-11
sysdep/unix/krt.c
sysdep/unix/krt.c
+8
-1
sysdep/unix/krt.h
sysdep/unix/krt.h
+1
-0
No files found.
sysdep/unix/krt.Y
View file @
ace3072e
...
...
@@ -16,16 +16,6 @@ CF_DEFINES
#define THIS_KIF ((struct kif_config *) this_proto)
#define KIF_IFACE ((struct kif_iface_config *) this_ipatt)
static void
krt_set_merge_paths(struct channel_config *cc, uint merge, uint limit)
{
if ((limit <= 0) || (limit > 255))
cf_error("Merge paths limit must be in range 1-255");
cc->ra_mode = merge ? RA_MERGED : RA_OPTIMAL;
cc->merge_limit = limit;
}
static void
kif_set_preferred(ip_addr ip)
{
...
...
@@ -80,7 +70,7 @@ kern_item:
}
| GRACEFUL RESTART bool { THIS_KRT->graceful_restart = $3; }
| MERGE PATHS bool kern_mp_limit {
krt_set_merge_paths(this_channel, $3, $4)
;
THIS_KRT->merge_paths = $3 ? $4 : 0
;
#ifndef KRT_ALLOW_MERGE_PATHS
if ($3)
cf_error("Path merging not supported on this platform");
...
...
sysdep/unix/krt.c
View file @
ace3072e
...
...
@@ -1059,11 +1059,18 @@ krt_postconfig(struct proto_config *CF)
cf_error
(
"All kernel syncers must use the same table scan interval"
);
#endif
struct
rtable_config
*
tab
=
proto_cf_main_channel
(
CF
)
->
table
;
struct
channel_config
*
cc
=
proto_cf_main_channel
(
CF
);
struct
rtable_config
*
tab
=
cc
->
table
;
if
(
tab
->
krt_attached
)
cf_error
(
"Kernel syncer (%s) already attached to table %s"
,
tab
->
krt_attached
->
name
,
tab
->
name
);
tab
->
krt_attached
=
CF
;
if
(
cf
->
merge_paths
)
{
cc
->
ra_mode
=
RA_MERGED
;
cc
->
merge_limit
=
cf
->
merge_paths
;
}
krt_sys_postconfig
(
cf
);
}
...
...
sysdep/unix/krt.h
View file @
ace3072e
...
...
@@ -50,6 +50,7 @@ struct krt_config {
int
persist
;
/* Keep routes when we exit */
int
learn
;
/* Learn routes from other sources */
int
graceful_restart
;
/* Regard graceful restart recovery */
int
merge_paths
;
/* Exported routes are merged for ECMP */
};
struct
krt_proto
{
...
...
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