diff --git a/include/proto/raw_sock.h b/include/proto/raw_sock.h index 704cbc16a..97da3535e 100644 --- a/include/proto/raw_sock.h +++ b/include/proto/raw_sock.h @@ -24,8 +24,6 @@ #include -extern struct xprt_ops raw_sock; - #endif /* _PROTO_RAW_SOCK_H */ /* diff --git a/include/proto/ssl_sock.h b/include/proto/ssl_sock.h index eea53443e..d3756a129 100644 --- a/include/proto/ssl_sock.h +++ b/include/proto/ssl_sock.h @@ -28,7 +28,6 @@ #include #include -extern struct xprt_ops ssl_sock; extern int sslconns; extern int totalsslconns; @@ -36,7 +35,7 @@ extern int totalsslconns; static inline int ssl_sock_is_ssl(struct connection *conn) { - if (!conn || conn->xprt != &ssl_sock || !conn->xprt_ctx) + if (!conn || conn->xprt != xprt_get(XPRT_SSL) || !conn->xprt_ctx) return 0; else return 1; diff --git a/src/raw_sock.c b/src/raw_sock.c index 78cb8a2a6..f24f201f0 100644 --- a/src/raw_sock.c +++ b/src/raw_sock.c @@ -406,7 +406,7 @@ static int raw_sock_from_buf(struct connection *conn, struct buffer *buf, int fl /* transport-layer operations for RAW sockets */ -struct xprt_ops raw_sock = { +static struct xprt_ops raw_sock = { .snd_buf = raw_sock_from_buf, .rcv_buf = raw_sock_to_buf, #if defined(CONFIG_HAP_LINUX_SPLICE) diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 101f7f342..f5d4920a9 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -130,6 +130,7 @@ enum { int sslconns = 0; int totalsslconns = 0; +static struct xprt_ops ssl_sock; #if (defined SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB && TLS_TICKETS_NO > 0) struct list tlskeys_reference = LIST_HEAD_INIT(tlskeys_reference); @@ -6648,7 +6649,7 @@ static struct cfg_kw_list cfg_kws = {ILH, { }}; /* transport-layer operations for SSL sockets */ -struct xprt_ops ssl_sock = { +static struct xprt_ops ssl_sock = { .snd_buf = ssl_sock_from_buf, .rcv_buf = ssl_sock_to_buf, .rcv_pipe = NULL,