diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-05-19 13:22:31 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-05-19 13:22:31 +0200 |
commit | 6b6d2deecc246cf9780d31e1cd03a52aa5bfd9d2 (patch) | |
tree | 25e09967aebaa64850f072625c8f20a4221c1334 /src/socket-util.c | |
parent | 6ea832a20700f5282c08c70f38422c6ab290a0b5 (diff) |
socket: expose IP_TRANSPARENT
Diffstat (limited to 'src/socket-util.c')
-rw-r--r-- | src/socket-util.c | 7 |
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; |