diff options
author | 2008-05-11 08:50:54 +0000 | |
---|---|---|
committer | 2008-05-11 08:50:54 +0000 | |
commit | a07ad480367871189fd2f7b87d01eab553414da4 (patch) | |
tree | 144ac35408d2a86ae28cd1ee1e2fd4098a8dbcd4 | |
parent | rtrequest to rtrequest1 conversion in inet6. With that no rtrequest should (diff) | |
download | wireguard-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.c | 5 |
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)); |