summaryrefslogtreecommitdiffstats
path: root/ospfd/ospfd.c
diff options
context:
space:
mode:
authorpaul <paul>2006-01-11 01:08:19 +0000
committerpaul <paul>2006-01-11 01:08:19 +0000
commitac9eb52245741b11ecb1dc002b7aec4b24e26eeb (patch)
treeb1f9a5e9a0d96fe6c52752a947fc7ac5a16000f6 /ospfd/ospfd.c
parent5ecba14fbeb96e79bd7bf23919b997002cfc39b8 (diff)
downloadquagga-ac9eb52245741b11ecb1dc002b7aec4b24e26eeb.tar.bz2
quagga-ac9eb52245741b11ecb1dc002b7aec4b24e26eeb.tar.xz
[ospfd] Bug #234. Fix nbr_self reinitialisation after down/up.
2006-01-10 Len Sorensen <lennartsorensen@ruggedcom.com> * (general) Bug #234, see also [quagga-dev 3902]. Fix problem with nbr_self not being properly reinitialised when an interface comes up, after having been down. Some re-arrangement done by Paul Jakma, any bugs introduced on top of Len's suggested changes are his. * ospf_neighbor.c: (ospf_nbr_add_self) centralise initialisation of nbr_self parameters here. * ospf_interface.c: (ospf_if_new) deleting initialisation of parameters of nbr_self, just rely on call to ospf_nbr_add_self. (ospf_if_cleanup) ditto. * ospfd.c: (ospf_network_run) ditto.
Diffstat (limited to 'ospfd/ospfd.c')
-rw-r--r--ospfd/ospfd.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index 7c993655..680a5006 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -859,24 +859,14 @@ ospf_network_run (struct ospf *ospf, struct prefix *p, struct ospf_area *area)
oi = ospf_if_new (ospf, ifp, co->address);
oi->connected = co;
- oi->nbr_self->address = *oi->address;
-
oi->area = area;
oi->params = ospf_lookup_if_params (ifp, oi->address->u.prefix4);
oi->output_cost = ospf_if_get_output_cost (oi);
- if (area->external_routing != OSPF_AREA_DEFAULT)
- UNSET_FLAG (oi->nbr_self->options, OSPF_OPTION_E);
- oi->nbr_self->priority = OSPF_IF_PARAM (oi, priority);
-
/* Add pseudo neighbor. */
ospf_nbr_add_self (oi);
- /* Make sure pseudo neighbor's router_id. */
- oi->nbr_self->router_id = ospf->router_id;
- oi->nbr_self->src = oi->address->u.prefix4;
-
/* Relate ospf interface to ospf instance. */
oi->ospf = ospf;
@@ -885,21 +875,6 @@ ospf_network_run (struct ospf *ospf, struct prefix *p, struct ospf_area *area)
skip network type setting. */
oi->type = IF_DEF_PARAMS (ifp)->type;
- /* Set area flag. */
- switch (area->external_routing)
- {
- case OSPF_AREA_DEFAULT:
- SET_FLAG (oi->nbr_self->options, OSPF_OPTION_E);
- break;
- case OSPF_AREA_STUB:
- UNSET_FLAG (oi->nbr_self->options, OSPF_OPTION_E);
- break;
- case OSPF_AREA_NSSA:
- UNSET_FLAG (oi->nbr_self->options, OSPF_OPTION_E);
- SET_FLAG (oi->nbr_self->options, OSPF_OPTION_NP);
- break;
- }
-
ospf_area_add_if (oi->area, oi);
/* if router_id is not configured, dont bring up