From: Andrew J. Schorr Date: Tue, 24 Oct 2006 19:04:26 +0000 (+0000) Subject: [ospfd] Stop losing subsequent default-information originate 'always' info X-Git-Tag: frr-2.0-rc1~2583 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=8fb8a504e2c7c216b34c58e5658d84cb7dbe79b0;p=mirror%2Ffrr.git [ospfd] Stop losing subsequent default-information originate 'always' info 2006-10-24 Andrew J. Schorr * ospf_zebra.c: (ospf_redistribute_default_set) Fix bug where a new value for ospf->default_originate was being ignored if a previous 'default-information originate' command had already been processed. --- diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog index 8a215e6b38..d2b979aa88 100644 --- a/ospfd/ChangeLog +++ b/ospfd/ChangeLog @@ -1,3 +1,10 @@ +2006-10-24 Andrew J. Schorr + + * ospf_zebra.c: (ospf_redistribute_default_set) Fix bug where + a new value for ospf->default_originate was being ignored + if a previous 'default-information originate' command + had already been processed. + 2006-10-22 Yar Tikhiy * (general) Add support for passive-interface default (with diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index 5a722e0502..aaee31e118 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -576,21 +576,15 @@ int ospf_redistribute_default_set (struct ospf *ospf, int originate, int mtype, int mvalue) { - int force = 0; + ospf->default_originate = originate; + ospf->dmetric[DEFAULT_ROUTE].type = mtype; + ospf->dmetric[DEFAULT_ROUTE].value = mvalue; if (ospf_is_type_redistributed (DEFAULT_ROUTE)) { - if (mtype != ospf->dmetric[DEFAULT_ROUTE].type) - { - ospf->dmetric[DEFAULT_ROUTE].type = mtype; - force = 1; - } - if (mvalue != ospf->dmetric[DEFAULT_ROUTE].value) - { - force = 1; - ospf->dmetric[DEFAULT_ROUTE].value = mvalue; - } - + /* if ospf->default_originate changes value, is calling + ospf_external_lsa_refresh_default sufficient to implement + the change? */ ospf_external_lsa_refresh_default (ospf); if (IS_DEBUG_OSPF (zebra, ZEBRA_REDISTRIBUTE)) @@ -601,10 +595,6 @@ ospf_redistribute_default_set (struct ospf *ospf, int originate, return CMD_SUCCESS; } - ospf->default_originate = originate; - ospf->dmetric[DEFAULT_ROUTE].type = mtype; - ospf->dmetric[DEFAULT_ROUTE].value = mvalue; - zclient_redistribute_default (ZEBRA_REDISTRIBUTE_DEFAULT_ADD, zclient); if (IS_DEBUG_OSPF (zebra, ZEBRA_REDISTRIBUTE))