Commits

Dinesh Dutt authored and David Lamparter committed 7cf997226e8
ospf6d: don't send LSAck on an interface if we've flooded the LSU out that i/f

If we flood an LSA back out the same interface we received it from, don't send an LSAck out that interface for that LSA. This is as per RFC 2328, section 13.5 Signed-off-by: Dinesh G Dutt <ddutt at cumulusnetworks.com> Reviewed-by: Pradosh Mohapatra <pmohapat at cumulusnetworks.com> Reviewed-by: Scott Feldman <sfeldma at cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
No tags

ospf6d/ospf6_flood.c

Modified
380 380 if (from && from->ospf6_if == oi &&
381 381 (from->router_id == oi->drouter || from->router_id == oi->bdrouter))
382 382 {
383 383 if (is_debug)
384 384 zlog_debug ("Received is from the I/F's DR or BDR, next interface");
385 385 return;
386 386 }
387 387
388 388 /* (4) If the new LSA was received on this interface,
389 389 and the interface state is BDR, examin next interface */
390 - if (from && from->ospf6_if == oi && oi->state == OSPF6_INTERFACE_BDR)
390 + if (from && from->ospf6_if == oi)
391 391 {
392 - if (is_debug)
393 - zlog_debug ("Received is from the I/F, itself BDR, next interface");
394 - return;
392 + if (oi->state == OSPF6_INTERFACE_BDR)
393 + {
394 + if (is_debug)
395 + zlog_debug ("Received is from the I/F, itself BDR, next interface");
396 + return;
397 + }
398 + SET_FLAG(lsa->flag, OSPF6_LSA_FLOODBACK);
395 399 }
396 400
397 401 /* (5) flood the LSA out the interface. */
398 402 if (is_debug)
399 403 zlog_debug ("Schedule flooding for the interface");
400 404 if ((oi->type == OSPF_IFTYPE_BROADCAST) ||
401 405 (oi->type == OSPF_IFTYPE_POINTOPOINT))
402 406 {
403 407 ospf6_lsdb_add (ospf6_lsa_copy (lsa), oi->lsupdate_list);
404 408 if (oi->thread_send_lsupdate == NULL)
553 557 struct ospf6_interface *oi;
554 558 int is_debug = 0;
555 559
556 560 if (IS_OSPF6_DEBUG_FLOODING ||
557 561 IS_OSPF6_DEBUG_FLOOD_TYPE (lsa->header->type))
558 562 is_debug++;
559 563
560 564 assert (from && from->ospf6_if);
561 565 oi = from->ospf6_if;
562 566
563 - /* LSA has been flood back out receiving interface.
564 - No acknowledgement sent. */
565 - if (CHECK_FLAG (lsa->flag, OSPF6_LSA_FLOODBACK))
566 - {
567 - if (is_debug)
568 - zlog_debug ("No acknowledgement (BDR & FloodBack)");
569 - return;
570 - }
571 -
572 567 /* LSA is more recent than database copy, but was not flooded
573 568 back out receiving interface. Delayed acknowledgement sent
574 569 if advertisement received from Designated Router,
575 570 otherwide do nothing. */
576 571 if (ismore_recent < 0)
577 572 {
578 573 if (oi->drouter == from->router_id)
579 574 {
580 575 if (is_debug)
581 576 zlog_debug ("Delayed acknowledgement (BDR & MoreRecent & from DR)");

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut