summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rw-r--r--sbin/iked/iked.88
-rw-r--r--sbin/iked/iked.c8
-rw-r--r--sbin/iked/version.h3
3 files changed, 14 insertions, 5 deletions
diff --git a/sbin/iked/iked.8 b/sbin/iked/iked.8
index 87b24966767..faa7cfda78c 100644
--- a/sbin/iked/iked.8
+++ b/sbin/iked/iked.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: iked.8,v 1.28 2020/11/20 13:03:00 jmc Exp $
+.\" $OpenBSD: iked.8,v 1.29 2021/11/29 12:27:18 tobhe Exp $
.\"
.\" Copyright (c) 2010 - 2014 Reyk Floeter <reyk@openbsd.org>
.\"
@@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: November 20 2020 $
+.Dd $Mdocdate: November 29 2021 $
.Dt IKED 8
.Os
.Sh NAME
@@ -22,7 +22,7 @@
.Nd Internet Key Exchange version 2 (IKEv2) daemon
.Sh SYNOPSIS
.Nm iked
-.Op Fl dnSTtv
+.Op Fl dnSTtvV
.Op Fl D Ar macro Ns = Ns Ar value
.Op Fl f Ar file
.Op Fl p Ar udpencap_port
@@ -109,6 +109,8 @@ This option is only recommended for testing; the default is to
negotiate NAT-Traversal with the peers.
.It Fl v
Produce more verbose output.
+.It Fl V
+Show the version and exit.
.El
.Sh PUBLIC KEY AUTHENTICATION
It is possible to store trusted public keys to make them directly
diff --git a/sbin/iked/iked.c b/sbin/iked/iked.c
index fa7fd3d5c6a..b08101533c5 100644
--- a/sbin/iked/iked.c
+++ b/sbin/iked/iked.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iked.c,v 1.59 2021/11/25 18:28:51 tobhe Exp $ */
+/* $OpenBSD: iked.c,v 1.60 2021/11/29 12:27:18 tobhe Exp $ */
/*
* Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de>
@@ -36,6 +36,7 @@
#include "iked.h"
#include "ikev2.h"
+#include "version.h"
__dead void usage(void);
@@ -78,7 +79,7 @@ main(int argc, char *argv[])
log_init(1, LOG_DAEMON);
- while ((c = getopt(argc, argv, "6D:df:np:Ss:Ttv")) != -1) {
+ while ((c = getopt(argc, argv, "6D:df:np:Ss:TtvV")) != -1) {
switch (c) {
case '6':
log_warnx("the -6 option is ignored and will be "
@@ -127,6 +128,9 @@ main(int argc, char *argv[])
verbose++;
opts |= IKED_OPT_VERBOSE;
break;
+ case 'V':
+ fprintf(stderr, "OpenIKED %s\n", IKED_VERSION);
+ return 0;
default:
usage();
}
diff --git a/sbin/iked/version.h b/sbin/iked/version.h
new file mode 100644
index 00000000000..e242ba49691
--- /dev/null
+++ b/sbin/iked/version.h
@@ -0,0 +1,3 @@
+/* $OpenBSD: version.h,v 1.1 2021/11/29 12:27:18 tobhe Exp $ */
+
+#define IKED_VERSION "7.0"