Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
labs
BIRD Internet Routing Daemon
Commits
6f68f066
Commit
6f68f066
authored
May 29, 2009
by
Ondřej Zajíček
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 'primary' configuration option.
parent
7c3d06b0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
sysdep/unix/krt.Y
sysdep/unix/krt.Y
+8
-0
sysdep/unix/krt.h
sysdep/unix/krt.h
+8
-0
No files found.
sysdep/unix/krt.Y
View file @
6f68f066
...
...
@@ -68,6 +68,7 @@ kif_proto_start: proto_start DEVICE {
cf_kif = this_proto = proto_config_new(&proto_unix_iface, sizeof(struct kif_config));
this_proto->preference = DEF_PREF_DIRECT;
THIS_KIF->scan_time = 60;
init_list(&THIS_KIF->primary);
krt_if_construct(THIS_KIF);
}
;
...
...
@@ -81,6 +82,13 @@ kif_item:
/* Scan time of 0 means scan on startup only */
THIS_KIF->scan_time = $3;
}
| PRIMARY TEXT prefix_or_ipa {
struct kif_primary_item *kpi = cfg_alloc(sizeof (struct kif_primary_item));
kpi->pattern = $2;
kpi->prefix = $3.addr;
kpi->pxlen = $3.len;
add_tail(&THIS_KIF->primary, &kpi->n);
}
;
CF_CODE
...
...
sysdep/unix/krt.h
View file @
6f68f066
...
...
@@ -86,10 +86,18 @@ void krt_got_route_async(struct krt_proto *p, struct rte *e, int new);
extern
struct
protocol
proto_unix_iface
;
struct
kif_primary_item
{
node
n
;
byte
*
pattern
;
ip_addr
prefix
;
int
pxlen
;
};
struct
kif_config
{
struct
proto_config
c
;
struct
krt_if_params
iface
;
int
scan_time
;
/* How often we re-scan interfaces */
list
primary
;
/* Preferences for primary addresses */
};
struct
kif_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