summaryrefslogtreecommitdiffstats
path: root/sysdep/unix/krt-set.Y
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1999-02-13 21:46:03 +0100
committerMartin Mares <mj@ucw.cz>1999-02-13 21:46:03 +0100
commit013a9b91fe495371cbf9a5690613de45b634e3af (patch)
tree29ed464a9658596b389e66c0a206b00e3c94200e /sysdep/unix/krt-set.Y
parent0a2e9d9f5685fb4ca63e02fd3645194bb6de79d7 (diff)
downloadbird-013a9b91fe495371cbf9a5690613de45b634e3af.tar
bird-013a9b91fe495371cbf9a5690613de45b634e3af.zip
When shutting down, remove all routes (except for RTS_INHERIT and RTS_DEVICE
routes) from kernel routing tables unless the "persist" switch is set.
Diffstat (limited to 'sysdep/unix/krt-set.Y')
-rw-r--r--sysdep/unix/krt-set.Y29
1 files changed, 29 insertions, 0 deletions
diff --git a/sysdep/unix/krt-set.Y b/sysdep/unix/krt-set.Y
new file mode 100644
index 0000000..551ee16
--- /dev/null
+++ b/sysdep/unix/krt-set.Y
@@ -0,0 +1,29 @@
+/*
+ * BIRD -- UNIX Kernel Syncer Configuration
+ *
+ * (c) 1998--1999 Martin Mares <mj@ucw.cz>
+ *
+ * Can be freely distributed and used under the terms of the GNU GPL.
+ */
+
+CF_HDR
+
+#include "lib/krt-scan.h"
+
+CF_DECLS
+
+CF_KEYWORDS(PERSIST)
+
+CF_GRAMMAR
+
+CF_ADDTO(kern_proto, kern_proto krt_set_item ';')
+
+krt_set_item:
+ PERSIST bool {
+ ((struct krt_config *) this_proto)->setopt.persist = $2;
+ }
+ ;
+
+CF_CODE
+
+CF_END