diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-10-13 09:57:38 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-10-13 09:57:38 +0000 |
commit | 51c13c8086cbe605db8155d0e43b6e827c47bab3 (patch) | |
tree | 01d683baf76f35c5f7d5d0144715d462a2476977 /usr.sbin/ospfd/lsupdate.c | |
parent | 403771082c59c0bc35d25367f07a0836e628166a (diff) |
Fix a memory leak in the ospf engine. First of all ospfd did not track if a
LSA was already queued on nbr self. So after the first round -- where the
lsa was queued -- ospfd would remove it again in a second run.
That was not enough but the LSA was removed from the wrong neighbor -- nbr
instead of iface->self. LIST_REMOVE does not track the queue and so that
resulted in some strangeness (especially the lsa_cache did not get cleared).
OK norby@
Diffstat (limited to 'usr.sbin/ospfd/lsupdate.c')
-rw-r--r-- | usr.sbin/ospfd/lsupdate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ospfd/lsupdate.c b/usr.sbin/ospfd/lsupdate.c index 0f458ec89ad..184c1174523 100644 --- a/usr.sbin/ospfd/lsupdate.c +++ b/usr.sbin/ospfd/lsupdate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lsupdate.c,v 1.14 2005/10/13 09:36:37 claudio Exp $ */ +/* $OpenBSD: lsupdate.c,v 1.15 2005/10/13 09:57:37 claudio Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -51,9 +51,9 @@ lsa_flood(struct iface *iface, struct nbr *originator, struct lsa_hdr *lsa_hdr, if (!(nbr->state & NBR_STA_FLOOD)) continue; - if (iface->state & IF_STA_DROTHER) + if (iface->state & IF_STA_DROTHER && !queued) if ((le = ls_retrans_list_get(iface->self, lsa_hdr))) - ls_retrans_list_free(nbr, le); + ls_retrans_list_free(iface->self, le); if ((le = ls_retrans_list_get(nbr, lsa_hdr))) ls_retrans_list_free(nbr, le); |