summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sasyncd
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2017-04-10 09:27:08 +0000
committerreyk <reyk@openbsd.org>2017-04-10 09:27:08 +0000
commit6ce7bd46e70c1b1f4ccc9c61f75694726d9334be (patch)
treebac9976641738cc8eafdf268126b0c7c28876569 /usr.sbin/sasyncd
parentRemove always false comparison: inosused type is ino_t, which is (diff)
downloadwireguard-openbsd-6ce7bd46e70c1b1f4ccc9c61f75694726d9334be.tar.xz
wireguard-openbsd-6ce7bd46e70c1b1f4ccc9c61f75694726d9334be.zip
Check early if the mandatory carp "interface" was configured.
This allows the new -n config check to work correctly. OK jsg@ deraadt@
Diffstat (limited to 'usr.sbin/sasyncd')
-rw-r--r--usr.sbin/sasyncd/sasyncd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/sasyncd/sasyncd.c b/usr.sbin/sasyncd/sasyncd.c
index 8e3be4f1ba9..8214457e77c 100644
--- a/usr.sbin/sasyncd/sasyncd.c
+++ b/usr.sbin/sasyncd/sasyncd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sasyncd.c,v 1.26 2017/04/04 22:37:01 jsg Exp $ */
+/* $OpenBSD: sasyncd.c,v 1.27 2017/04/10 09:27:08 reyk Exp $ */
/*
* Copyright (c) 2005 Håkan Olsson. All rights reserved.
@@ -197,6 +197,11 @@ main(int argc, char **argv)
"no shared key specified, cannot continue\n");
exit(1);
}
+ if (!cfgstate.carp_ifname || !*cfgstate.carp_ifname) {
+ fprintf(stderr, "config: "
+ "no carp interface specified, cannot continue\n");
+ exit(1);
+ }
} else {
exit(1);
}