Skip to content

Commit c57733c

Browse files
committed
systemd-sockact: set port to 0 on unix domain
1 parent 638558a commit c57733c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/plat/unix/unix-systemd.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ lws_systemd_inherited_fd(unsigned int index,
4343

4444
info->vh_listen_sockfd = (int)(SD_LISTEN_FDS_START + index);
4545

46-
if (sd_is_socket_unix(info->vh_listen_sockfd, 0, 0, NULL, 0))
46+
if (sd_is_socket_unix(info->vh_listen_sockfd, 0, 0, NULL, 0)) {
4747
info->options |= LWS_SERVER_OPTION_UNIX_SOCK;
48+
info->port = 0;
49+
}
4850

4951
if (sd_is_socket_inet(info->vh_listen_sockfd, AF_UNSPEC, 0, 1, 0)) {
5052
struct sockaddr_storage addr;

0 commit comments

Comments
 (0)