summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbeck <beck@openbsd.org>2008-05-11 08:50:54 +0000
committerbeck <beck@openbsd.org>2008-05-11 08:50:54 +0000
commita07ad480367871189fd2f7b87d01eab553414da4 (patch)
tree144ac35408d2a86ae28cd1ee1e2fd4098a8dbcd4
parentrtrequest to rtrequest1 conversion in inet6. With that no rtrequest should (diff)
downloadwireguard-openbsd-a07ad480367871189fd2f7b87d01eab553414da4.tar.xz
wireguard-openbsd-a07ad480367871189fd2f7b87d01eab553414da4.zip
fix sync.c to not puke if sync_lease called without sync_init.
from henric.
-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 03814c339e2..a5a95fbc0ec 100644
--- a/usr.sbin/dhcpd/sync.c
+++ b/usr.sbin/dhcpd/sync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sync.c,v 1.4 2008/05/08 14:15:40 deraadt Exp $ */
+/* $OpenBSD: sync.c,v 1.5 2008/05/11 08:50:54 beck Exp $ */
/*
* Copyright (c) 2008 Bob Beck <beck@openbsd.org>
@@ -417,6 +417,9 @@ sync_lease(struct lease *lease)
HMAC_CTX ctx;
u_int hmac_len;
+ if (sync_key == NULL)
+ return;
+
bzero(&hdr, sizeof(hdr));
bzero(&ld, sizeof(ld));
bzero(&pad, sizeof(pad));