diff options
Diffstat (limited to 'src/core/dbus-socket.c')
-rw-r--r-- | src/core/dbus-socket.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/dbus-socket.c b/src/core/dbus-socket.c index 73bb4c74c8..88e180a037 100644 --- a/src/core/dbus-socket.c +++ b/src/core/dbus-socket.c @@ -142,7 +142,10 @@ static inline bool check_size_t_truncation(uint64_t t) { return (size_t) t == t; } -static inline const char* socket_protocol_to_name_supported(int32_t i) { +static inline const char* supported_socket_protocol_to_string(int32_t i) { + if (i == IPPROTO_IP) + return ""; + if (!IN_SET(i, IPPROTO_UDPLITE, IPPROTO_SCTP)) return NULL; @@ -156,7 +159,7 @@ static BUS_DEFINE_SET_TRANSIENT_PARSE(bind_ipv6_only, SocketAddressBindIPv6Only, static BUS_DEFINE_SET_TRANSIENT_STRING_WITH_CHECK(fdname, fdname_is_valid); static BUS_DEFINE_SET_TRANSIENT_STRING_WITH_CHECK(ifname, ifname_valid); static BUS_DEFINE_SET_TRANSIENT_TO_STRING_ALLOC(ip_tos, "i", int32_t, int, "%" PRIi32, ip_tos_to_string_alloc); -static BUS_DEFINE_SET_TRANSIENT_TO_STRING(socket_protocol, "i", int32_t, int, "%" PRIi32, socket_protocol_to_name_supported); +static BUS_DEFINE_SET_TRANSIENT_TO_STRING(socket_protocol, "i", int32_t, int, "%" PRIi32, supported_socket_protocol_to_string); static int bus_socket_set_transient_property( Socket *s, |