diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-01-11 10:53:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-11 10:53:59 +0100 |
commit | 84e6712f946dd0d08102bf75eebd2852829408ae (patch) | |
tree | a9cc9a81fa4c5b9bf7dff4c1ced4b9e6391df267 /src/core/service.c | |
parent | 29b5b0c93d273e99ca13a6729b85dabbf8768691 (diff) | |
parent | 359a5bcf78a89626ca9119668c0362f3b7bfe9c3 (diff) |
Merge pull request #5046 from stefanha/vsock
Add AF_VSOCK socket activation support
Diffstat (limited to 'src/core/service.c')
-rw-r--r-- | src/core/service.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/service.c b/src/core/service.c index 73a8104d17..54074ff7bc 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -1292,10 +1292,10 @@ static int service_spawn( return r; } - if (r == 0 && IN_SET(sa.sa.sa_family, AF_INET, AF_INET6)) { + if (r == 0 && IN_SET(sa.sa.sa_family, AF_INET, AF_INET6, AF_VSOCK)) { _cleanup_free_ char *addr = NULL; char *t; - int port; + unsigned port; r = sockaddr_pretty(&sa.sa, salen, true, false, &addr); if (r < 0) @@ -1306,9 +1306,9 @@ static int service_spawn( return -ENOMEM; our_env[n_env++] = t; - port = sockaddr_port(&sa.sa); - if (port < 0) - return port; + r = sockaddr_port(&sa.sa, &port); + if (r < 0) + return r; if (asprintf(&t, "REMOTE_PORT=%u", port) < 0) return -ENOMEM; |