If an interface stops, it might affect the routing priority.
When dhcpcd is exiting we want to avoid this behaviour to keep
the system running as best as.
struct rt *rt, *rtn;
unsigned long long o;
+ /* When exiting with persistence, don't change any routing
+ * which maybe affected by interfaces stopping. */
+ if ((ctx->options & (DHCPCD_EXITING | DHCPCD_PERSISTENT)) ==
+ (DHCPCD_EXITING | DHCPCD_PERSISTENT))
+ return;
+
rb_tree_init(&routes, &rt_compare_proto_ops);
rb_tree_init(&added, &rt_compare_os_ops);
rb_tree_init(&kroutes, &rt_compare_os_ops);