Changeset View
Changeset View
Standalone View
Standalone View
sbin/ifconfig/ifwg.c
Show First 20 Lines • Show All 601 Lines • ▼ Show 20 Lines | |||||
static void | static void | ||||
wg_create(int s, struct ifreq *ifr) | wg_create(int s, struct ifreq *ifr) | ||||
{ | { | ||||
struct iovec iov; | struct iovec iov; | ||||
void *packed; | void *packed; | ||||
size_t size; | size_t size; | ||||
setproctitle("ifconfig %s create ...\n", name); | setproctitle("ifconfig %s create ...\n", name); | ||||
if (!nvlist_exists_number(nvl_params, "listen-port")) | |||||
goto legacy; | |||||
if (!nvlist_exists_binary(nvl_params, "private-key")) | if (!nvlist_exists_binary(nvl_params, "private-key")) | ||||
goto legacy; | goto legacy; | ||||
packed = nvlist_pack(nvl_params, &size); | packed = nvlist_pack(nvl_params, &size); | ||||
if (packed == NULL) | if (packed == NULL) | ||||
errx(1, "failed to setup create request"); | errx(1, "failed to setup create request"); | ||||
iov.iov_len = size; | iov.iov_len = size; | ||||
iov.iov_base = packed; | iov.iov_base = packed; | ||||
Show All 23 Lines |