When in persist mode, don't delete routes from kernel tables even if

they cease to exist in our routing tables due to protocols having shut down.
This commit is contained in:
Martin Mares 2000-05-16 13:36:38 +00:00
parent c5a06f65ee
commit f990fc61e0
2 changed files with 4 additions and 8 deletions

10
TODO
View file

@ -1,15 +1,7 @@
Core Core
~~~~ ~~~~
- configure: default CFLAGS?
- filters: deletion of mandatory attributes?
- filters: user defined attributes?
- filters: arithmetics and define'd symbols
- kernel: persistent mode - kernel: persistent mode
- cli: show tables?
- client: Ctrl-R eats one more enter - client: Ctrl-R eats one more enter
- client: paging? - client: paging?
- client: data losses on large dumps? - client: data losses on large dumps?
@ -48,6 +40,7 @@ Various ideas
- netlink: realms - netlink: realms
- netlink: import Linux route attributes to our rta's, so that they can be filtered? - netlink: import Linux route attributes to our rta's, so that they can be filtered?
- config: executable config files - config: executable config files
- filters: user defined attributes?
- client: access control - client: access control
- io: use poll if available - io: use poll if available
- IPv6 router advertisements - IPv6 router advertisements
@ -59,6 +52,7 @@ Various ideas
- generate default route if any working BGP connection exists (aggregate engine again?) - generate default route if any working BGP connection exists (aggregate engine again?)
- generate default route to IGP's (aggregate engine yet another time?) - generate default route to IGP's (aggregate engine yet another time?)
- look at RFC 2386 (QoS-based routing) - look at RFC 2386 (QoS-based routing)
- cli: show tables?
OSPF OSPF

View file

@ -667,6 +667,8 @@ krt_notify(struct proto *P, net *net, rte *new, rte *old, struct ea_list *attrs)
{ {
struct krt_proto *p = (struct krt_proto *) P; struct krt_proto *p = (struct krt_proto *) P;
if (shutting_down && KRT_CF->persist)
return;
if (new && (!krt_capable(new) || new->attrs->source == RTS_INHERIT)) if (new && (!krt_capable(new) || new->attrs->source == RTS_INHERIT))
new = NULL; new = NULL;
if (!(net->n.flags & KRF_INSTALLED)) if (!(net->n.flags & KRF_INSTALLED))