address. Defaults to <option>false</option>.</para></listitem>
</varlistentry>
+ <varlistentry>
+ <term><varname>Transparent=</varname></term>
+ <listitem><para>Takes a boolean
+ value. Controls the IP_TRANSPARENT
+ option. Defaults to
+ <option>false</option>.</para></listitem>
+ </varlistentry>
+
<varlistentry>
<term><varname>TCPCongestion=</varname></term>
<listitem><para>Takes a string
" <property name=\"IPTTL\" type=\"i\" access=\"read\"/>\n" \
" <property name=\"PipeSize\" type=\"t\" access=\"read\"/>\n" \
" <property name=\"FreeBind\" type=\"b\" access=\"read\"/>\n" \
+ " <property name=\"Transparent\" type=\"b\" access=\"read\"/>\n" \
" <property name=\"Mark\" type=\"i\" access=\"read\"/>\n" \
" <property name=\"MaxConnections\" type=\"u\" access=\"read\"/>\n" \
" <property name=\"NAccepted\" type=\"u\" access=\"read\"/>\n" \
{ "org.freedesktop.systemd1.Socket", "IPTTL", bus_property_append_int, "i", &u->socket.ip_ttl },
{ "org.freedesktop.systemd1.Socket", "PipeSize", bus_property_append_size, "t", &u->socket.pipe_size },
{ "org.freedesktop.systemd1.Socket", "FreeBind", bus_property_append_bool, "b", &u->socket.free_bind },
+ { "org.freedesktop.systemd1.Socket", "Transparent", bus_property_append_bool, "b", &u->socket.transparent },
{ "org.freedesktop.systemd1.Socket", "Mark", bus_property_append_int, "i", &u->socket.mark },
{ "org.freedesktop.systemd1.Socket", "MaxConnections", bus_property_append_unsigned, "u", &u->socket.max_connections },
{ "org.freedesktop.systemd1.Socket", "NConnections", bus_property_append_unsigned, "u", &u->socket.n_connections },
{ "Mark", config_parse_int, 0, &u->socket.mark, "Socket" },
{ "PipeSize", config_parse_size, 0, &u->socket.pipe_size, "Socket" },
{ "FreeBind", config_parse_bool, 0, &u->socket.free_bind, "Socket" },
+ { "Transparent", config_parse_bool, 0, &u->socket.transparent, "Socket" },
{ "TCPCongestion", config_parse_string, 0, &u->socket.tcp_congestion, "Socket" },
{ "MessageQueueMaxMessages", config_parse_long, 0, &u->socket.mq_maxmsg, "Socket" },
{ "MessageQueueMessageSize", config_parse_long, 0, &u->socket.mq_msgsize, "Socket" },
SocketAddressBindIPv6Only only,
const char *bind_to_device,
bool free_bind,
+ bool transparent,
mode_t directory_mode,
mode_t socket_mode,
const char *label,
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;
SocketAddressBindIPv6Only only,
const char *bind_to_device,
bool free_bind,
+ bool transparent,
mode_t directory_mode,
mode_t socket_mode,
const char *label,
"%sDirectoryMode: %04o\n"
"%sKeepAlive: %s\n"
"%sFreeBind: %s\n"
+ "%sTransparent: %s\n"
"%sTCPCongestion: %s\n",
prefix, socket_state_to_string(s->state),
prefix, socket_address_bind_ipv6_only_to_string(s->bind_ipv6_only),
prefix, s->directory_mode,
prefix, yes_no(s->keep_alive),
prefix, yes_no(s->free_bind),
+ prefix, yes_no(s->transparent),
prefix, strna(s->tcp_congestion));
if (s->control_pid > 0)
s->bind_ipv6_only,
s->bind_to_device,
s->free_bind,
+ s->transparent,
s->directory_mode,
s->socket_mode,
label,
/* Socket options */
bool keep_alive;
bool free_bind;
+ bool transparent;
int priority;
int mark;
size_t receive_buffer;