From 3f2a21fd348e49cf3ca98750b14e14dd04b3209b Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 29 Mar 1999 20:14:00 +0000 Subject: [PATCH] Don't try to delete interface routes on CONFIG_AUTO_ROUTES systems. --- sysdep/unix/krt.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c index 8a3db3f1..096b9da5 100644 --- a/sysdep/unix/krt.c +++ b/sysdep/unix/krt.c @@ -178,7 +178,14 @@ krt_got_route(struct krt_proto *p, rte *e) if (old = net->routes) { if (!krt_capable(old)) - verdict = krt_capable(e) ? KRF_DELETE : KRF_SEEN; + { +#ifdef CONFIG_AUTO_ROUTES + if (old->attrs->source == RTS_DEVICE) + verdict = KRF_SEEN; + else +#endif + verdict = krt_capable(e) ? KRF_DELETE : KRF_SEEN; + } else if (krt_uptodate(e, net->routes)) verdict = KRF_SEEN; else