summaryrefslogtreecommitdiff
path: root/source4/lib/socket/socket_ipv6.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/socket/socket_ipv6.c')
-rw-r--r--source4/lib/socket/socket_ipv6.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/lib/socket/socket_ipv6.c b/source4/lib/socket/socket_ipv6.c
index 35b4037ff4..27e452b14e 100644
--- a/source4/lib/socket/socket_ipv6.c
+++ b/source4/lib/socket/socket_ipv6.c
@@ -347,8 +347,6 @@ static int ipv6_tcp_get_fd(struct socket_context *sock)
static const struct socket_ops ipv6_tcp_ops = {
.name = "ipv6",
- .type = SOCKET_TYPE_STREAM,
-
.fn_init = ipv6_tcp_init,
.fn_connect = ipv6_tcp_connect,
.fn_connect_complete = ipv6_tcp_connect_complete,
@@ -369,7 +367,10 @@ static const struct socket_ops ipv6_tcp_ops = {
.fn_get_fd = ipv6_tcp_get_fd
};
-const struct socket_ops *socket_ipv6_ops(void)
+const struct socket_ops *socket_ipv6_ops(enum socket_type type)
{
+ if (type != SOCKET_TYPE_STREAM) {
+ return NULL;
+ }
return &ipv6_tcp_ops;
}