[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quagga-dev
Subject:    [quagga-dev 8684] [PATCH] ospfd: Fix DST address in retransmission
From:       Joakim Tjernlund <Joakim.Tjernlund () transmode ! se>
Date:       2011-04-09 17:08:33
Message-ID: 1302368913-27941-1-git-send-email-Joakim.Tjernlund () transmode ! se
[Download RAW message or body]

RFF 2338, Chap 13.5 says:
"Retransmissions of Link State Update packets are ALWAYS sent
 directly to the neighbor. On multi-access networks, this means
 that retransmissions should be sent to the neighbor's IP address.
"
Directly to the neighbour on non multi-access networks such as
PtP means AllSPFRouters and for virtual links it is the peer.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
---
 ospfd/ospf_packet.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index 158187b..420449f 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -3537,8 +3537,13 @@ ospf_ls_ack_send (struct ospf_neighbor *nbr, struct ospf_lsa *lsa)
   struct ospf_interface *oi = nbr->oi;
 
   if (listcount (oi->ls_ack_direct.ls_ack) == 0)
-    oi->ls_ack_direct.dst = nbr->address.u.prefix4;
-  
+    if (oi->type == OSPF_IFTYPE_POINTOPOINT)
+      oi->ls_ack_direct.dst.s_addr = htonl (OSPF_ALLSPFROUTERS);
+    else if (oi->type == OSPF_IFTYPE_VIRTUALLINK)
+      oi->ls_ack_direct.dst = oi->vl_data->peer_addr;
+    else
+      oi->ls_ack_direct.dst = nbr->address.u.prefix4;
+
   listnode_add (oi->ls_ack_direct.ls_ack, ospf_lsa_lock (lsa));
   
   if (oi->t_ls_ack_direct == NULL)
-- 
1.7.3.4

_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
http://lists.quagga.net/mailman/listinfo/quagga-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic