]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
OSPF: Send direct acknowledgements as unicast
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Sun, 3 Feb 2019 20:31:53 +0000 (21:31 +0100)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Sun, 3 Feb 2019 20:31:53 +0000 (21:31 +0100)
Direct acknowledgements should be send as unicast to a corresponding
neighbor. Only delayed acks should be send as multicast to all/designated
routers.

proto/ospf/lsack.c

index 3fd7e092bc1719bfb1a3bb8a0e782b004c5b3327..96e69f3e26a6684ea43712ab59f7581dd1a441de 100644 (file)
@@ -106,6 +106,13 @@ ospf_send_lsack_(struct ospf_proto *p, struct ospf_neighbor *n, int queue)
   length = ospf_pkt_hdrlen(p) + i * sizeof(struct ospf_lsa_header);
   pkt->length = htons(length);
 
+  if (queue == ACKL_DIRECT)
+  {
+    OSPF_PACKET(ospf_dump_lsack, pkt, "LSACK packet sent to nbr %R on %s", n->rid, ifa->ifname);
+    ospf_send_to(ifa, n->ip);
+    return;
+  }
+
   OSPF_PACKET(ospf_dump_lsack, pkt, "LSACK packet sent via %s", ifa->ifname);
 
   if (ifa->type == OSPF_IT_BCAST)