summaryrefslogtreecommitdiff
path: root/sysdep/unix/krt.Y
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2011-11-07 00:31:23 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2011-11-07 00:31:23 +0100
commita7f23f581f5e3efe92ec97dfca7d01c66f31ab04 (patch)
tree3a8f7cffb7abce83b7bce8be87d21be8a2fbff72 /sysdep/unix/krt.Y
parent74add5df17c386bd109ebea7b1dac04d1651ae51 (diff)
Implements protocol templates.
Based on the patch from Alexander V. Chernikov. Extended to support almost all protocols. Uses 'protocol bgp NAME from TEMPLATE { ... }' syntax.
Diffstat (limited to 'sysdep/unix/krt.Y')
-rw-r--r--sysdep/unix/krt.Y4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdep/unix/krt.Y b/sysdep/unix/krt.Y
index 0375a13b..86081966 100644
--- a/sysdep/unix/krt.Y
+++ b/sysdep/unix/krt.Y
@@ -30,7 +30,7 @@ kern_proto_start: proto_start KERNEL {
if (cf_krt)
cf_error("Kernel protocol already defined");
#endif
- cf_krt = this_proto = proto_config_new(&proto_unix_kernel, sizeof(struct krt_config));
+ cf_krt = this_proto = proto_config_new(&proto_unix_kernel, sizeof(struct krt_config), $1);
this_proto->preference = DEF_PREF_INHERITED;
THIS_KRT->scan_time = 60;
THIS_KRT->learn = THIS_KRT->persist = 0;
@@ -66,7 +66,7 @@ CF_ADDTO(proto, kif_proto '}')
kif_proto_start: proto_start DEVICE {
if (cf_kif)
cf_error("Kernel device protocol already defined");
- cf_kif = this_proto = proto_config_new(&proto_unix_iface, sizeof(struct kif_config));
+ cf_kif = this_proto = proto_config_new(&proto_unix_iface, sizeof(struct kif_config), $1);
this_proto->preference = DEF_PREF_DIRECT;
THIS_KIF->scan_time = 60;
init_list(&THIS_KIF->primary);