summaryrefslogtreecommitdiff
path: root/src/socket-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-05-19 13:22:31 +0200
committerLennart Poettering <lennart@poettering.net>2011-05-19 13:22:31 +0200
commit6b6d2deecc246cf9780d31e1cd03a52aa5bfd9d2 (patch)
tree25e09967aebaa64850f072625c8f20a4221c1334 /src/socket-util.c
parent6ea832a20700f5282c08c70f38422c6ab290a0b5 (diff)
socket: expose IP_TRANSPARENT
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;