diff options
Diffstat (limited to 'src/starter/starterwhack.c')
-rw-r--r-- | src/starter/starterwhack.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/starter/starterwhack.c b/src/starter/starterwhack.c index 0588cf35b..4bc76de01 100644 --- a/src/starter/starterwhack.c +++ b/src/starter/starterwhack.c @@ -19,6 +19,7 @@ #include <sys/un.h> #include <stddef.h> #include <unistd.h> +#include <string.h> #include <errno.h> #include <freeswan.h> @@ -56,11 +57,14 @@ pack_str (char **p, char **next, char **roof) static int send_whack_msg (whack_message_t *msg) { - struct sockaddr_un ctl_addr = { AF_UNIX, PLUTO_CTL_FILE }; + struct sockaddr_un ctl_addr; int sock; ssize_t len; char *str_next, *str_roof; + ctl_addr.sun_family = AF_UNIX; + strcpy(ctl_addr.sun_path, PLUTO_CTL_FILE); + /* pack strings */ str_next = (char *)msg->string; str_roof = (char *)&msg->string[sizeof(msg->string)]; |