forked from Mirror/frr
[ospfd] Stop losing subsequent default-information originate 'always' info
2006-10-24 Andrew J. Schorr <ajschorr@alumni.princeton.edu> * 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.
This commit is contained in:
parent
7ffa8fa232
commit
8fb8a504e2
|
@ -1,3 +1,10 @@
|
||||||
|
2006-10-24 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
|
||||||
|
|
||||||
|
* 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 <yar@comp.chem.msu.su>
|
2006-10-22 Yar Tikhiy <yar@comp.chem.msu.su>
|
||||||
|
|
||||||
* (general) Add support for passive-interface default (with
|
* (general) Add support for passive-interface default (with
|
||||||
|
|
|
@ -576,21 +576,15 @@ int
|
||||||
ospf_redistribute_default_set (struct ospf *ospf, int originate,
|
ospf_redistribute_default_set (struct ospf *ospf, int originate,
|
||||||
int mtype, int mvalue)
|
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 (ospf_is_type_redistributed (DEFAULT_ROUTE))
|
||||||
{
|
{
|
||||||
if (mtype != ospf->dmetric[DEFAULT_ROUTE].type)
|
/* if ospf->default_originate changes value, is calling
|
||||||
{
|
ospf_external_lsa_refresh_default sufficient to implement
|
||||||
ospf->dmetric[DEFAULT_ROUTE].type = mtype;
|
the change? */
|
||||||
force = 1;
|
|
||||||
}
|
|
||||||
if (mvalue != ospf->dmetric[DEFAULT_ROUTE].value)
|
|
||||||
{
|
|
||||||
force = 1;
|
|
||||||
ospf->dmetric[DEFAULT_ROUTE].value = mvalue;
|
|
||||||
}
|
|
||||||
|
|
||||||
ospf_external_lsa_refresh_default (ospf);
|
ospf_external_lsa_refresh_default (ospf);
|
||||||
|
|
||||||
if (IS_DEBUG_OSPF (zebra, ZEBRA_REDISTRIBUTE))
|
if (IS_DEBUG_OSPF (zebra, ZEBRA_REDISTRIBUTE))
|
||||||
|
@ -601,10 +595,6 @@ ospf_redistribute_default_set (struct ospf *ospf, int originate,
|
||||||
return CMD_SUCCESS;
|
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);
|
zclient_redistribute_default (ZEBRA_REDISTRIBUTE_DEFAULT_ADD, zclient);
|
||||||
|
|
||||||
if (IS_DEBUG_OSPF (zebra, ZEBRA_REDISTRIBUTE))
|
if (IS_DEBUG_OSPF (zebra, ZEBRA_REDISTRIBUTE))
|
||||||
|
|
Loading…
Reference in a new issue