Revision cf98be7b sysdep/unix/krt.c

View differences:

sysdep/unix/krt.c
581 581
    {
582 582
      net *n = (net *) f;
583 583
      rte *e = n->routes;
584
      if (e && (n->n.flags & KRF_INSTALLED))
584
      if (rte_is_valid(e) && (n->n.flags & KRF_INSTALLED))
585 585
	{
586 586
	  /* FIXME: this does not work if gw is changed in export filter */
587 587
	  krt_replace_rte(p, e->net, NULL, e, NULL);
......
656 656
    }
657 657

  
658 658
  old = net->routes;
659
  if ((net->n.flags & KRF_INSTALLED) && old)
659
  if ((net->n.flags & KRF_INSTALLED) && rte_is_valid(old))
660 660
    {
661 661
      /* There may be changes in route attributes, we ignore that.
662 662
         Also, this does not work well if gw is changed in export filter */

Also available in: Unified diff