1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Disable multiple OSPF pseudointerfaces on BSD.

This commit is contained in:
Ondrej Zajicek
2010-03-26 14:48:01 +01:00
parent 885b3d6127
commit af157fa3db
5 changed files with 29 additions and 7 deletions

View File

@@ -763,16 +763,17 @@ ospf_reconfigure(struct proto *p, struct proto_config *c)
}
/* stub */
if ((oldip->stub == 0) && (newip->stub != 0))
int old_stub = ospf_iface_stubby(oldip, ifa->addr);
int new_stub = ospf_iface_stubby(newip, ifa->addr);
if (!old_stub && new_stub)
{
ifa->stub = newip->stub;
ifa->stub = 1;
OSPF_TRACE(D_EVENTS, "Interface %s is now stub.", ifa->iface->name);
}
if ((oldip->stub != 0) && (newip->stub == 0) && (ifa->ioprob == OSPF_I_OK))
if (old_stub && !new_stub && (ifa->ioprob == OSPF_I_OK))
{
ifa->stub = newip->stub;
OSPF_TRACE(D_EVENTS,
"Interface %s is no longer stub.", ifa->iface->name);
ifa->stub = 0;
OSPF_TRACE(D_EVENTS, "Interface %s is no longer stub.", ifa->iface->name);
}
#ifdef OSPFv2