summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2020-09-14 09:07:06 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2020-09-14 09:07:06 +0000
commit11046a3d863960b14f1311eecb3b17cb9363fa68 (patch)
treee1776274f5c6ff82bd0b68c584fc757f02608525 /usr.sbin
parent5352130e146793b264d6d0dff61305cf25a21b97 (diff)
Let slaacd handle all rdomains in a single daemon.
Suggested by claudio and matthieu Testing matthieu Putting it in now to get enough testing before release so that there is enough time to back it out, suggested by deraadt
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/slaacctl/slaacctl.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/usr.sbin/slaacctl/slaacctl.c b/usr.sbin/slaacctl/slaacctl.c
index 46e3d3d98dd..4b17fa3b02f 100644
--- a/usr.sbin/slaacctl/slaacctl.c
+++ b/usr.sbin/slaacctl/slaacctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: slaacctl.c,v 1.19 2020/04/16 05:28:30 florian Exp $ */
+/* $OpenBSD: slaacctl.c,v 1.20 2020/09/14 09:07:05 florian Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -71,13 +71,13 @@ main(int argc, char *argv[])
int done = 0;
int n, verbose = 0;
int ch;
- char *sockname = NULL;
+ char *sockname;
+ sockname = SLAACD_SOCKET;
while ((ch = getopt(argc, argv, "s:")) != -1) {
switch (ch) {
case 's':
- if ((sockname = strdup(optarg)) == NULL)
- err(1, NULL);
+ sockname = optarg;
break;
default:
usage();
@@ -86,12 +86,6 @@ main(int argc, char *argv[])
argc -= optind;
argv += optind;
- if (sockname == NULL) {
- if (asprintf(&sockname, "%s.%d", SLAACD_SOCKET, getrtable()) ==
- -1)
- err(1, NULL);
- }
-
if (pledge("stdio unix", NULL) == -1)
err(1, "pledge");
@@ -106,7 +100,6 @@ main(int argc, char *argv[])
memset(&sun, 0, sizeof(sun));
sun.sun_family = AF_UNIX;
strlcpy(sun.sun_path, sockname, sizeof(sun.sun_path));
- free(sockname);
if (connect(ctl_sock, (struct sockaddr *)&sun, sizeof(sun)) == -1)
err(1, "connect: %s", sockname);