Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
labs
BIRD Internet Routing Daemon
Commits
916c8c0a
Commit
916c8c0a
authored
May 08, 2000
by
Martin Mareš
Browse files
Use preferences properly.
parent
1151401e
Changes
4
Hide whitespace changes
Inline
Side-by-side
nest/route.h
View file @
916c8c0a
...
...
@@ -351,10 +351,10 @@ extern struct protocol *attr_class_to_protocol[EAP_MAX];
#define DEF_PREF_DIRECT 240
/* Directly connected */
#define DEF_PREF_STATIC 200
/* Static route */
#define DEF_PREF_OSPF
_INTERNAL
150
/* OSPF intra-area, inter-area and type 1 external routes */
#define DEF_PREF_OSPF
150
/* OSPF intra-area, inter-area and type 1 external routes */
#define DEF_PREF_RIP 120
/* RIP */
#define DEF_PREF_BGP 100
/* BGP */
#define DEF_PREF_OSPF_EXTERNAL 80
/* OSPF external routes */
#define DEF_PREF_PIPE 70
/* Routes piped from other tables */
#define DEF_PREF_INHERITED 10
/* Routes inherited from other routing daemons */
#endif
proto/ospf/config.Y
View file @
916c8c0a
...
...
@@ -20,6 +20,7 @@ CF_ADDTO(proto, ospf_proto '}')
ospf_proto_start: proto_start OSPF {
this_proto = proto_config_new(&proto_ospf, sizeof(struct ospf_config));
this_proto->preference = DEF_PREF_OSPF;
}
;
...
...
proto/ospf/rt.c
View file @
916c8c0a
...
...
@@ -211,6 +211,7 @@ again:
e
->
u
.
ospf
.
tag
=
0
;
/* FIXME Some config? */
e
->
pflags
=
0
;
e
->
net
=
ne
;
e
->
pref
=
p
->
preference
;
DBG
(
"Modifying rt entry %I
\n
(IP: %I, GW: %I, Iface: %s)
\n
"
,
nf
->
fn
.
prefix
,
ip
,
en
->
nh
,
en
->
nhi
->
name
);
rte_update
(
p
->
table
,
ne
,
p
,
e
);
...
...
sysdep/unix/krt.Y
View file @
916c8c0a
...
...
@@ -31,7 +31,7 @@ kern_proto_start: proto_start KERNEL {
cf_error("Kernel protocol already defined");
#endif
cf_krt = this_proto = proto_config_new(&proto_unix_kernel, sizeof(struct krt_config));
this_proto->preference =
0
;
this_proto->preference =
DEF_PREF_INHERITED
;
THIS_KRT->scan_time = 60;
THIS_KRT->learn = THIS_KRT->persist = 0;
krt_scan_construct(THIS_KRT);
...
...
Write
Preview
Supports
Markdown
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