diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2010-03-26 14:48:01 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2010-03-26 14:48:01 +0100 |
commit | af157fa3dbe2bba0674eb7634efd3ade6c89d604 (patch) | |
tree | a4ea7c3b83a3af814eace38d9c02bd2f468d644d /proto/ospf/ospf.c | |
parent | 885b3d6127ae2c5c4f17d9dba95ffe67bdf7a688 (diff) |
Disable multiple OSPF pseudointerfaces on BSD.
Diffstat (limited to 'proto/ospf/ospf.c')
-rw-r--r-- | proto/ospf/ospf.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c index e77156b7..e8245110 100644 --- a/proto/ospf/ospf.c +++ b/proto/ospf/ospf.c @@ -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 |