summaryrefslogtreecommitdiff
path: root/usr.sbin/dhcpd/sync.c
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2008-05-08 05:38:27 +0000
committerBob Beck <beck@cvs.openbsd.org>2008-05-08 05:38:27 +0000
commitf56b131ec4c0f1fd800f3b3ecd0c3ffb06ef4a60 (patch)
treed6eeb7546a821987bb190171617c9f443938894f /usr.sbin/dhcpd/sync.c
parent0fc048ad7913b9199d07a3be80c65cdfca4e7c29 (diff)
don't break dhcpd when not using synch mechanisms..
Diffstat (limited to 'usr.sbin/dhcpd/sync.c')
-rw-r--r--usr.sbin/dhcpd/sync.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/dhcpd/sync.c b/usr.sbin/dhcpd/sync.c
index 58c776608c1..38155d70de4 100644
--- a/usr.sbin/dhcpd/sync.c
+++ b/usr.sbin/dhcpd/sync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sync.c,v 1.1 2008/05/07 12:19:20 beck Exp $ */
+/* $OpenBSD: sync.c,v 1.2 2008/05/08 05:38:26 beck Exp $ */
/*
* Copyright (c) 2008 Bob Beck <beck@openbsd.org>
@@ -375,6 +375,9 @@ sync_send(struct iovec *iov, int iovlen)
{
struct sync_host *shost;
struct msghdr msg;
+
+ if (syncfd == -1)
+ return;
/* setup buffer */
bzero(&msg, sizeof(msg));