Revision af157fa3 proto/ospf/ospf.c

View differences:

proto/ospf/ospf.c
763 763
	}
764 764

  
765 765
	/* stub */
766
	if ((oldip->stub == 0) && (newip->stub != 0))
766
	int old_stub = ospf_iface_stubby(oldip, ifa->addr);
767
	int new_stub = ospf_iface_stubby(newip, ifa->addr);
768
	if (!old_stub && new_stub)
767 769
	{
768
	  ifa->stub = newip->stub;
770
	  ifa->stub = 1;
769 771
	  OSPF_TRACE(D_EVENTS, "Interface %s is now stub.", ifa->iface->name);
770 772
	}
771
	if ((oldip->stub != 0) && (newip->stub == 0) && (ifa->ioprob == OSPF_I_OK))
773
	if (old_stub && !new_stub && (ifa->ioprob == OSPF_I_OK))
772 774
	{
773
	  ifa->stub = newip->stub;
774
	  OSPF_TRACE(D_EVENTS,
775
		     "Interface %s is no longer stub.", ifa->iface->name);
775
	  ifa->stub = 0;
776
	  OSPF_TRACE(D_EVENTS, "Interface %s is no longer stub.", ifa->iface->name);
776 777
	}
777 778

  
778 779
#ifdef OSPFv2	

Also available in: Unified diff