diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2006-08-30 18:27:18 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2006-08-30 18:27:18 +0000 |
commit | edbb0d2b23265c1e7baccbbba4ac72076410dd1e (patch) | |
tree | c00d364dc2b8b149b1cc1a33afc5942b78e5dc76 | |
parent | 8e587110ac1576db9e2b457524787e0224278729 (diff) |
need to retry writing to pfkey socket on EAGAIN, ok theo hshoexer
-rw-r--r-- | sbin/isakmpd/pf_key_v2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/isakmpd/pf_key_v2.c b/sbin/isakmpd/pf_key_v2.c index 252274be819..d825b814af5 100644 --- a/sbin/isakmpd/pf_key_v2.c +++ b/sbin/isakmpd/pf_key_v2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_key_v2.c,v 1.173 2006/08/30 10:50:36 markus Exp $ */ +/* $OpenBSD: pf_key_v2.c,v 1.174 2006/08/30 18:27:17 henning Exp $ */ /* $EOM: pf_key_v2.c,v 1.79 2000/12/12 00:33:19 niklas Exp $ */ /* @@ -373,7 +373,9 @@ pf_key_v2_write(struct pf_key_v2_msg *pmsg) (u_int8_t *) iov[i].iov_base, iov[i].iov_len)); } - n = writev(pf_key_v2_socket, iov, cnt); + do { + n = writev(pf_key_v2_socket, iov, cnt); + } while (n == -1 && (errno == EAGAIN || errno == EINTR)); if (n == -1) { log_error("pf_key_v2_write: writev (%d, %p, %d) failed", pf_key_v2_socket, iov, cnt); |