Revision 1567edea

View differences:

conf/conf.c
266 266
    }
267 267
  if (old_config)			/* Reconfiguration already in progress */
268 268
    {
269
      if (shutting_down)
269
      if (shutting_down == 2)
270 270
	{
271 271
	  log(L_INFO "New configuration discarded due to shutdown");
272 272
	  config_free(c);
......
314 314
  init_list(&c->protos);
315 315
  init_list(&c->tables);
316 316
  c->shutdown = 1;
317
  config_commit(c);
318 317
  shutting_down = 1;
318
  config_commit(c);
319
  shutting_down = 2;
319 320
}
320 321

  
321 322
/**
sysdep/linux/netlink/netlink.c
498 498
      nl_add_attr_ipa(&r.h, sizeof(r), RTA_GATEWAY, a->gw);
499 499
      break;
500 500
    case RTD_DEVICE:
501
      if (!a->iface)
502
	return;
501 503
      r.r.rtm_type = RTN_UNICAST;
502 504
      nl_add_attr_u32(&r.h, sizeof(r), RTA_OIF, a->iface->index);
503 505
      break;
......
531 533
  else
532 534
    {
533 535
      if (old)
534
	{
535
	  if (!old->attrs->iface || (old->attrs->iface->flags & IF_UP))
536
	    nl_send_route(p, old, 0);
537
	  /* else the kernel has already flushed it */
538
	}
536
	nl_send_route(p, old, 0);
537

  
539 538
      if (new)
540 539
	nl_send_route(p, new, 1);
541 540
    }
sysdep/unix/krt-set.c
61 61
      re.rt_flags |= RTF_GATEWAY;
62 62
      break;
63 63
    case RTD_DEVICE:
64
      if (!a->iface)
65
	return;
64 66
      re.rt_dev = a->iface->name;
65 67
      break;
66 68
#ifdef RTF_REJECT
sysdep/unix/krt.c
684 684
{
685 685
  struct krt_proto *p = (struct krt_proto *) P;
686 686

  
687
  if (shutting_down && KRT_CF->persist)
687
  if (shutting_down)
688 688
    return;
689 689
  if (new && (!krt_capable(new) || new->attrs->source == RTS_INHERIT))
690 690
    new = NULL;

Also available in: Unified diff