From: Vipin Kumar <[email protected]>

ISSUE:

LSAcks (for directed acks) are being sent to neighbor's unicast address.

RFC 2328 says:

"The IP destination address for the packet is selected as
 follows.  On physical point-to-point networks, the IP
 destination is always set to the address AllSPFRouters"

Fix is to unconditionally set the destination address for LSAcks over
point-to-point links as AllSPFRouters. Quagga OSPF already has similar
change for OSPF DBD, LSUpdate and LSrequest packets.

Signed-off-by: Vipin Kumar <[email protected]>
Reviewed-by: Daniel Walton <[email protected]>
Reviewed-by: Dinesh G Dutt <[email protected]>
---
 ospfd/ospf_packet.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index 9a8f1d6..2dfe586 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -3854,9 +3854,12 @@ ospf_ls_ack_send_list (struct ospf_interface *oi, struct 
list *ack,
   /* Set packet length. */
   op->length = length;
 
-  /* Set destination IP address. */
-  op->dst = dst;
-  
+  /* Decide destination address. */
+  if (oi->type == OSPF_IFTYPE_POINTOPOINT)
+    op->dst.s_addr = htonl (OSPF_ALLSPFROUTERS);
+  else
+    op->dst.s_addr = dst.s_addr;
+
   /* Add packet to the interface output queue. */
   ospf_packet_add (oi, op);
 
-- 
1.9.1


_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to