summaryrefslogtreecommitdiffstats
path: root/zebra/main.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-05-11 09:50:11 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-05-24 01:36:41 +0200
commit33656d2db287fd293be0cfc59885e2b8ebc2ecad (patch)
treeca74766f9eb56cb73bf1aeb2a8838fa979153b35 /zebra/main.c
parentzebra: Add kernel level graceful restart (diff)
downloadfrr-33656d2db287fd293be0cfc59885e2b8ebc2ecad.tar.xz
frr-33656d2db287fd293be0cfc59885e2b8ebc2ecad.zip
doc, zebra: Remove `keep_kernel_mode` from zebra
This code doees this: a) Imagine ospf installs a route into zebra. Zebra crashes and we restart FRR. If we are using the -k option on zebra than all routes are re-read in, including this OSPF route. b) Now imagine at the same time that zebra is starting backup ospf on a different router looses a link to the this route. c) Since zebra was run with -k this OSPF route is read back in but never replaced and we now have a route pointing out an interface to other routers that cannot handle it. We should never allow users to implement bad options from zebra's perspective that allow them to put themselves into a clear problem state and additionally we have *absolutely* no mechanism to ever fix that broken route without special human interaction. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/main.c')
-rw-r--r--zebra/main.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/zebra/main.c b/zebra/main.c
index af1f6084b..5797a5846 100644
--- a/zebra/main.c
+++ b/zebra/main.c
@@ -74,9 +74,6 @@ int retain_mode = 0;
/* Allow non-quagga entities to delete quagga routes */
int allow_delete = 0;
-/* Don't delete kernel route. */
-int keep_kernel_mode = 0;
-
int graceful_restart;
bool v6_rr_semantics = false;
@@ -272,7 +269,7 @@ int main(int argc, char **argv)
frr_preinit(&zebra_di, argc, argv);
frr_opt_add(
- "bakz:e:l:o:rK:"
+ "baz:e:l:o:rK:"
#ifdef HAVE_NETLINK
"s:n"
#endif
@@ -289,7 +286,6 @@ int main(int argc, char **argv)
" -z, --socket Set path of zebra socket\n"
" -e, --ecmp Specify ECMP to use.\n"
" -l, --label_socket Socket to external label manager\n"
- " -k, --keep_kernel Don't delete old routes which were installed by zebra.\n"
" -r, --retain When program terminates, retain added route by zebra.\n"
" -o, --vrfdefaultname Set default VRF name.\n"
" -K, --graceful_restart Graceful restart at the kernel level, timer in seconds for expiration\n"
@@ -321,13 +317,6 @@ int main(int argc, char **argv)
case 'a':
allow_delete = 1;
break;
- case 'k':
- if (graceful_restart) {
- zlog_err("Graceful Restart initiated, we cannot keep the existing kernel routes");
- return 1;
- }
- keep_kernel_mode = 1;
- break;
case 'e':
zrouter.multipath_num = atoi(optarg);
if (zrouter.multipath_num > MULTIPATH_NUM
@@ -358,10 +347,6 @@ int main(int argc, char **argv)
retain_mode = 1;
break;
case 'K':
- if (keep_kernel_mode) {
- zlog_err("Keep Kernel mode specified, graceful restart incompatible");
- return 1;
- }
graceful_restart = atoi(optarg);
break;
#ifdef HAVE_NETLINK
@@ -452,9 +437,8 @@ int main(int argc, char **argv)
* we have to have route_read() called before.
*/
zrouter.startup_time = monotime(NULL);
- if (!keep_kernel_mode)
- thread_add_timer(zrouter.master, rib_sweep_route,
- NULL, graceful_restart, NULL);
+ thread_add_timer(zrouter.master, rib_sweep_route,
+ NULL, graceful_restart, NULL);
/* Needed for BSD routing socket. */
pid = getpid();