summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2017-01-20 14:12:33 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2017-01-20 14:12:33 +0000
commitef7b697cda8d4722e36e2a761659045107a41dac (patch)
tree6728eb056f1f96b99262f8238d2f5deef59431f5 /sbin
parentce3fb3baf391a86660ad4b936091e2da9841c327 (diff)
Add a warning when the address pool is exhausted
From and OK markus@, OK reyk
Diffstat (limited to 'sbin')
-rw-r--r--sbin/iked/ikev2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/iked/ikev2.c b/sbin/iked/ikev2.c
index 7219a82f0a7..bf2a015326d 100644
--- a/sbin/iked/ikev2.c
+++ b/sbin/iked/ikev2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ikev2.c,v 1.132 2017/01/20 13:51:08 mikeb Exp $ */
+/* $OpenBSD: ikev2.c,v 1.133 2017/01/20 14:12:32 mikeb Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
@@ -5154,8 +5154,10 @@ ikev2_cp_setaddr(struct iked *env, struct iked_sa *sa, sa_family_t family)
/* but skip broadcast and network address */
if (host >= upper || host < lower)
host = lower;
- if (host == start)
+ if (host == start) {
+ log_warnx("%s: address pool exhausted", __func__);
return (-1); /* exhausted */
+ }
}
switch (addr.addr_af) {