1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

From Changelog:

2006-08-28 Andy Gay

        * 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.

PR:		ports/105279
Submitted by:	Boris Kovalenko <boris@tagnet.ru> (maintainer)
This commit is contained in:
Martin Wilke 2006-11-08 23:07:29 +00:00
parent eed17ecdff
commit 76cd4a8426
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=176877
2 changed files with 52 additions and 0 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= quagga
PORTVERSION= 0.99.5
PORTREVISION= 1
CATEGORIES= net ipv6
MASTER_SITES= http://quagga.net/download/ \
http://www.ru.quagga.net/download/ \

View File

@ -0,0 +1,51 @@
--- ospfd/ospf_packet.c.orig
+++ ospfd/ospf_packet.c
@@ -2712,25 +2712,9 @@ ospf_make_db_desc (struct ospf_interface
/* Set DD Sequence Number. */
stream_putl (s, nbr->dd_seqnum);
+ /* shortcut unneeded walk of (empty) summary LSDBs */
if (ospf_db_summary_isempty (nbr))
- {
- /* 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;
- }
+ goto empty;
/* Describe LSA Header from Database Summary List. */
lsdb = &nbr->db_sum;
@@ -2785,9 +2769,17 @@ ospf_make_db_desc (struct ospf_interface
/* Update 'More' bit */
if (ospf_db_summary_isempty (nbr))
{
- UNSET_FLAG (nbr->dd_flags, OSPF_DD_FLAG_M);
- /* Rewrite DD flags */
- stream_putc_at (s, pp, nbr->dd_flags);
+empty:
+ if (nbr->state >= NSM_Exchange)
+ {
+ 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;
}