forked from Mirror/frr
[ospfd] Fix assertion in DB-exchange fix, hit by ogier-db-ex-opt commit
2006-08-28 Andy Gay <andy@andynet.net> * ospf_packet.c: (ospf_make_db_desc) Assert added with More-bit fixes does not hold up with addition of Ogier DB-Exchange optimisation, which can empty the db-summary list in between sent DD packets. Remove assert, update More-bit always when in Exchange.
This commit is contained in:
parent
c15deb1b74
commit
b5aeb4410a
|
@ -1,3 +1,11 @@
|
||||||
|
2006-08-28 Andy Gay <andy@andynet.net>
|
||||||
|
|
||||||
|
* ospf_packet.c: (ospf_make_db_desc) Assert added with More-bit
|
||||||
|
fixes does not hold up with addition of Ogier DB-Exchange
|
||||||
|
optimisation, which can empty the db-summary list in between
|
||||||
|
sent DD packets. Remove assert, update More-bit always when
|
||||||
|
in Exchange.
|
||||||
|
|
||||||
2006-08-27 J.J. Krabbendam <jkrabbendam@aimsys.nl>
|
2006-08-27 J.J. Krabbendam <jkrabbendam@aimsys.nl>
|
||||||
|
|
||||||
* ospfd.c: (ospf_finish_final) default redistribute should be
|
* ospfd.c: (ospf_finish_final) default redistribute should be
|
||||||
|
|
|
@ -2712,25 +2712,9 @@ ospf_make_db_desc (struct ospf_interface *oi, struct ospf_neighbor *nbr,
|
||||||
/* Set DD Sequence Number. */
|
/* Set DD Sequence Number. */
|
||||||
stream_putl (s, nbr->dd_seqnum);
|
stream_putl (s, nbr->dd_seqnum);
|
||||||
|
|
||||||
|
/* shortcut unneeded walk of (empty) summary LSDBs */
|
||||||
if (ospf_db_summary_isempty (nbr))
|
if (ospf_db_summary_isempty (nbr))
|
||||||
{
|
goto empty;
|
||||||
/* Sanity check:
|
|
||||||
*
|
|
||||||
* Must be here either:
|
|
||||||
* - Initial DBD (ospf_nsm.c)
|
|
||||||
* - M must be set
|
|
||||||
* or
|
|
||||||
* - finishing Exchange, and DB-Summary list empty
|
|
||||||
* - from ospf_db_desc_proc()
|
|
||||||
* - M must not be set
|
|
||||||
*/
|
|
||||||
if (nbr->state >= NSM_Exchange)
|
|
||||||
assert (!IS_SET_DD_M(nbr->dd_flags));
|
|
||||||
else
|
|
||||||
assert (IS_SET_DD_M(nbr->dd_flags));
|
|
||||||
|
|
||||||
return length;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Describe LSA Header from Database Summary List. */
|
/* Describe LSA Header from Database Summary List. */
|
||||||
lsdb = &nbr->db_sum;
|
lsdb = &nbr->db_sum;
|
||||||
|
@ -2785,9 +2769,17 @@ ospf_make_db_desc (struct ospf_interface *oi, struct ospf_neighbor *nbr,
|
||||||
/* Update 'More' bit */
|
/* Update 'More' bit */
|
||||||
if (ospf_db_summary_isempty (nbr))
|
if (ospf_db_summary_isempty (nbr))
|
||||||
{
|
{
|
||||||
UNSET_FLAG (nbr->dd_flags, OSPF_DD_FLAG_M);
|
empty:
|
||||||
/* Rewrite DD flags */
|
if (nbr->state >= NSM_Exchange)
|
||||||
stream_putc_at (s, pp, nbr->dd_flags);
|
{
|
||||||
|
UNSET_FLAG (nbr->dd_flags, OSPF_DD_FLAG_M);
|
||||||
|
/* Rewrite DD flags */
|
||||||
|
stream_putc_at (s, pp, nbr->dd_flags);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
assert (IS_SET_DD_M(nbr->dd_flags));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue