summaryrefslogtreecommitdiff
path: root/src/socket-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-05-21 23:41:25 +0200
committerLennart Poettering <lennart@poettering.net>2010-05-21 23:41:25 +0200
commitc0120d992ce5ab004d9be5ff6ca15e5fe17f9884 (patch)
tree77293c20ec123d0e3f56ad21a2e08d2b0775106a /src/socket-util.c
parent88ce42f6944774788f610598fccdc6bab4283497 (diff)
socket: fix parsing of bind_ipv6_only
Diffstat (limited to 'src/socket-util.c')
-rw-r--r--src/socket-util.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/socket-util.c b/src/socket-util.c
index 32f6bcb941..0c9fc9f999 100644
--- a/src/socket-util.c
+++ b/src/socket-util.c
@@ -466,3 +466,11 @@ bool socket_address_needs_mount(const SocketAddress *a, const char *prefix) {
return path_startswith(a->sockaddr.un.sun_path, prefix);
}
+
+static const char* const socket_address_bind_ipv6_only_table[_SOCKET_ADDRESS_BIND_IPV6_ONLY_MAX] = {
+ [SOCKET_ADDRESS_DEFAULT] = "default",
+ [SOCKET_ADDRESS_BOTH] = "both",
+ [SOCKET_ADDRESS_IPV6_ONLY] = "ipv6-only"
+};
+
+DEFINE_STRING_TABLE_LOOKUP(socket_address_bind_ipv6_only, SocketAddressBindIPv6Only);