diff options
author | 2009-02-25 19:18:04 +0000 | |
---|---|---|
committer | 2009-02-25 19:18:04 +0000 | |
commit | 8ad4089dd0c3aeca262a57cb3212a593b8ef8ac6 (patch) | |
tree | 8b2f364da55391b99717878c266bf866eeee01f1 | |
parent | fix slow memory leak, spotted by Max Laier and Artis Caune (diff) | |
download | wireguard-openbsd-8ad4089dd0c3aeca262a57cb3212a593b8ef8ac6.tar.xz wireguard-openbsd-8ad4089dd0c3aeca262a57cb3212a593b8ef8ac6.zip |
add a stupid workaround for a race somewhere in the crypto code in the
kernel. a one second sleep has made it go away in all my tests. ok theo
-rw-r--r-- | usr.sbin/bgpd/pfkey.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/pfkey.c b/usr.sbin/bgpd/pfkey.c index bd0652ffb7f..23179f6d699 100644 --- a/usr.sbin/bgpd/pfkey.c +++ b/usr.sbin/bgpd/pfkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkey.c,v 1.34 2006/10/26 14:26:49 henning Exp $ */ +/* $OpenBSD: pfkey.c,v 1.35 2009/02/25 19:18:04 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -497,6 +497,8 @@ pfkey_sa_remove(struct bgpd_addr *src, struct bgpd_addr *dst, u_int32_t *spi) int pfkey_md5sig_establish(struct peer *p) { + sleep(1); + if (!p->auth.spi_out) if (pfkey_sa_add(&p->auth.local_addr, &p->conf.remote_addr, p->conf.auth.md5key_len, p->conf.auth.md5key, |