summaryrefslogtreecommitdiff
path: root/src/socket-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/socket-util.c')
-rw-r--r--src/socket-util.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/socket-util.c b/src/socket-util.c
index 779850d37f..e2e89886d4 100644
--- a/src/socket-util.c
+++ b/src/socket-util.c
@@ -389,6 +389,7 @@ int socket_address_listen(
SocketAddressBindIPv6Only only,
const char *bind_to_device,
bool free_bind,
+ bool transparent,
mode_t directory_mode,
mode_t socket_mode,
const char *label,
@@ -433,6 +434,12 @@ int socket_address_listen(
if (setsockopt(fd, IPPROTO_IP, IP_FREEBIND, &one, sizeof(one)) < 0)
log_warning("IP_FREEBIND failed: %m");
}
+
+ if (transparent) {
+ one = 1;
+ if (setsockopt(fd, IPPROTO_IP, IP_TRANSPARENT, &one, sizeof(one)) < 0)
+ log_warning("IP_TRANSPARENT failed: %m");
+ }
}
one = 1;