summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2006-03-08 13:23:09 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2006-03-08 13:23:09 +0000
commitcbda4665a87328ce8644ec7f8dd638a2788e91af (patch)
treec856424b160a669c6cbed14c864c5d4f883ebe43 /usr.sbin
parent50fd9ee170f03c05835590c419c27c14e0167cfb (diff)
Check for implied acks. If we receive an update that is on our retransmission
queue for the neighbor there is no need to send back an ack.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ospfd/ospfe.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/usr.sbin/ospfd/ospfe.c b/usr.sbin/ospfd/ospfe.c
index eae1cb9c99e..9eba379bd4a 100644
--- a/usr.sbin/ospfd/ospfe.c
+++ b/usr.sbin/ospfd/ospfe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospfe.c,v 1.40 2006/02/21 13:02:59 claudio Exp $ */
+/* $OpenBSD: ospfe.c,v 1.41 2006/03/08 13:23:08 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -515,7 +515,17 @@ ospfe_dispatch_rde(int fd, short event, void *bula)
if (nbr->iface->self == nbr)
break;
- /* TODO for case one check for implied acks */
+ if (imsg.hdr.len - IMSG_HEADER_SIZE != sizeof(lsa_hdr))
+ fatalx("ospfe_dispatch_rde: bad imsg size");
+ memcpy(&lsa_hdr, imsg.data, sizeof(lsa_hdr));
+
+ /* for case one check for implied acks */
+ if (nbr->iface->state & IF_STA_DROTHER)
+ if (ls_retrans_list_del(nbr->iface->self,
+ &lsa_hdr) == 0)
+ break;
+ if (ls_retrans_list_del(nbr, &lsa_hdr) == 0)
+ break;
/* send a direct acknowledgement */
send_ls_ack(nbr->iface, nbr->addr, imsg.data,