diff -uprN bird-as4-md5-rr-doc-fix2/conf/conf.c bird-as4-md5-rr-doc-fix3-x/conf/conf.c --- bird-as4-md5-rr-doc-fix2/conf/conf.c 2004-06-05 11:10:56.000000000 +0200 +++ bird-as4-md5-rr-doc-fix3-x/conf/conf.c 2008-10-24 21:36:11.000000000 +0200 @@ -266,7 +266,7 @@ config_commit(struct config *c) } if (old_config) /* Reconfiguration already in progress */ { - if (shutting_down) + if (shutting_down == 2) { log(L_INFO "New configuration discarded due to shutdown"); config_free(c); @@ -314,8 +314,9 @@ order_shutdown(void) init_list(&c->protos); init_list(&c->tables); c->shutdown = 1; - config_commit(c); shutting_down = 1; + config_commit(c); + shutting_down = 2; } /** diff -uprN bird-as4-md5-rr-doc-fix2/sysdep/linux/netlink/netlink.c bird-as4-md5-rr-doc-fix3-x/sysdep/linux/netlink/netlink.c --- bird-as4-md5-rr-doc-fix2/sysdep/linux/netlink/netlink.c 2008-08-25 13:38:53.000000000 +0200 +++ bird-as4-md5-rr-doc-fix3-x/sysdep/linux/netlink/netlink.c 2008-10-24 22:55:52.000000000 +0200 @@ -498,6 +498,8 @@ nl_send_route(struct krt_proto *p, rte * nl_add_attr_ipa(&r.h, sizeof(r), RTA_GATEWAY, a->gw); break; case RTD_DEVICE: + if (!a->iface) + return; r.r.rtm_type = RTN_UNICAST; nl_add_attr_u32(&r.h, sizeof(r), RTA_OIF, a->iface->index); break; @@ -531,11 +533,8 @@ krt_set_notify(struct krt_proto *p, net else { if (old) - { - if (!old->attrs->iface || (old->attrs->iface->flags & IF_UP)) - nl_send_route(p, old, 0); - /* else the kernel has already flushed it */ - } + nl_send_route(p, old, 0); + if (new) nl_send_route(p, new, 1); } diff -uprN bird-as4-md5-rr-doc-fix2/sysdep/unix/krt-set.c bird-as4-md5-rr-doc-fix3-x/sysdep/unix/krt-set.c --- bird-as4-md5-rr-doc-fix2/sysdep/unix/krt-set.c 2004-05-31 19:00:22.000000000 +0200 +++ bird-as4-md5-rr-doc-fix3-x/sysdep/unix/krt-set.c 2008-10-24 22:56:12.000000000 +0200 @@ -61,6 +61,8 @@ krt_ioctl(int ioc, rte *e, char *name) re.rt_flags |= RTF_GATEWAY; break; case RTD_DEVICE: + if (!a->iface) + return; re.rt_dev = a->iface->name; break; #ifdef RTF_REJECT diff -uprN bird-as4-md5-rr-doc-fix2/sysdep/unix/krt.c bird-as4-md5-rr-doc-fix3-x/sysdep/unix/krt.c --- bird-as4-md5-rr-doc-fix2/sysdep/unix/krt.c 2004-06-07 18:51:23.000000000 +0200 +++ bird-as4-md5-rr-doc-fix3-x/sysdep/unix/krt.c 2008-10-24 21:10:22.000000000 +0200 @@ -684,7 +684,7 @@ krt_notify(struct proto *P, net *net, rt { struct krt_proto *p = (struct krt_proto *) P; - if (shutting_down && KRT_CF->persist) + if (shutting_down) return; if (new && (!krt_capable(new) || new->attrs->source == RTS_INHERIT)) new = NULL;