printf("0\n");
return;
}
+ SHOW_FLAG(f, CS_FL_ADDR_FROM_SET);
+ SHOW_FLAG(f, CS_FL_ADDR_TO_SET);
SHOW_FLAG(f, CS_FL_ISBACK);
if (f) {
SHOW_FLAG(f, SI_FL_RXBLK_SHUT);
SHOW_FLAG(f, SI_FL_RXBLK_CONN);
SHOW_FLAG(f, SI_FL_RX_WAIT_EP);
- SHOW_FLAG(f, SI_FL_ADDR_FROM_SET);
- SHOW_FLAG(f, SI_FL_ADDR_TO_SET);
if (f) {
printf("EXTRA(0x%08x)", f);
enum {
CS_FL_NONE = 0x00000000, /* Just for initialization purposes */
CS_FL_ISBACK = 0x00000001, /* Set for CS on back-side */
+
+ CS_FL_ADDR_FROM_SET = 0x00000002, /* source address is set */
+ CS_FL_ADDR_TO_SET = 0x00000004, /* destination address is set */
};
/* cs_shutr() modes */
enum obj_type *app; /* points to the applicative point (stream or check) */
struct stream_interface *si;
const struct data_cb *data_cb; /* data layer callbacks. Must be set before xprt->init() */
+ struct sockaddr_storage *src; /* source address (pool), when known, otherwise NULL */
+ struct sockaddr_storage *dst; /* destination address (pool), when known, otherwise NULL */
};
#include <haproxy/channel-t.h>
#include <haproxy/stream-t.h>
#include <haproxy/task-t.h>
+#include <haproxy/connection.h>
#include <haproxy/conn_stream.h>
+#include <haproxy/session.h>
+#include <haproxy/stream.h>
/* returns the channel which receives data from this conn-stream (input channel) */
static inline struct channel *cs_ic(struct conn_stream *cs)
}
+/* Returns the source address of the conn-stream and, if not set, fallbacks on
+ * the session for frontend CS and the server connection for the backend CS. It
+ * returns a const address on success or NULL on failure.
+ */
+static inline const struct sockaddr_storage *cs_src(struct conn_stream *cs)
+{
+ if (cs->flags & CS_FL_ADDR_FROM_SET)
+ return cs->src;
+ if (!(cs->flags & CS_FL_ISBACK))
+ return sess_src(strm_sess(__cs_strm(cs)));
+ else {
+ struct connection *conn = cs_conn(cs);
+
+ if (conn)
+ return conn_src(conn);
+ }
+ return NULL;
+}
+
+
+/* Returns the destination address of the conn-stream and, if not set, fallbacks
+ * on the session for frontend CS and the server connection for the backend
+ * CS. It returns a const address on success or NULL on failure.
+ */
+static inline const struct sockaddr_storage *cs_dst(struct conn_stream *cs)
+{
+ if (cs->flags & CS_FL_ADDR_TO_SET)
+ return cs->dst;
+ if (!(cs->flags & CS_FL_ISBACK))
+ return sess_dst(strm_sess(__cs_strm(cs)));
+ else {
+ struct connection *conn = cs_conn(cs);
+
+ if (conn)
+ return conn_dst(conn);
+ }
+ return NULL;
+}
+
+/* Retrieves the source address of the conn-stream. Returns non-zero on success
+ * or zero on failure. The operation is only performed once and the address is
+ * stored in the conn-stream for future use. On the first call, the conn-stream
+ * source address is copied from the session one for frontend CS and the server
+ * connection for the backend CS.
+ */
+static inline int cs_get_src(struct conn_stream *cs)
+{
+ const struct sockaddr_storage *src = NULL;
+
+ if (cs->flags & CS_FL_ADDR_FROM_SET)
+ return 1;
+
+ if (!(cs->flags & CS_FL_ISBACK))
+ src = sess_src(strm_sess(__cs_strm(cs)));
+ else {
+ struct connection *conn = cs_conn(cs);
+
+ if (conn)
+ src = conn_src(conn);
+ }
+ if (!src)
+ return 0;
+
+ if (!sockaddr_alloc(&cs->src, src, sizeof(*src)))
+ return 0;
+
+ cs->flags |= CS_FL_ADDR_FROM_SET;
+ return 1;
+}
+
+/* Retrieves the destination address of the conn-stream. Returns non-zero on
+ * success or zero on failure. The operation is only performed once and the
+ * address is stored in the conn-stream for future use. On the first call, the
+ * conn-stream destination address is copied from the session one for frontend
+ * CS and the server connection for the backend CS.
+ */
+static inline int cs_get_dst(struct conn_stream *cs)
+{
+ const struct sockaddr_storage *dst = NULL;
+
+ if (cs->flags & CS_FL_ADDR_TO_SET)
+ return 1;
+
+ if (!(cs->flags & CS_FL_ISBACK))
+ dst = sess_dst(strm_sess(__cs_strm(cs)));
+ else {
+ struct connection *conn = cs_conn(cs);
+
+ if (conn)
+ dst = conn_dst(conn);
+ }
+ if (!dst)
+ return 0;
+
+ if (!sockaddr_alloc(&cs->dst, dst, sizeof(*dst)))
+ return 0;
+
+ cs->flags |= CS_FL_ADDR_TO_SET;
+ return 1;
+}
+
#endif /* _HAPROXY_CS_UTILS_H */
if (may_dequeue_tasks(objt_server(s->target), s->be))
process_srv_queue(objt_server(s->target));
- sockaddr_free(&cs_si(s->csb)->dst);
+ sockaddr_free(&s->csb->dst);
s->flags &= ~(SF_DIRECT | SF_ASSIGNED | SF_ADDR_SET);
si->state = SI_ST_REQ;
} else {
SI_FL_RXBLK_CONN = 0x00100000, /* other side is not connected */
SI_FL_RXBLK_ANY = 0x001F0000, /* any of the RXBLK flags above */
SI_FL_RX_WAIT_EP = 0x00200000, /* stream-int waits for more data from the end point */
- /* unused: 0x01000000, 0x02000000 */
-
- SI_FL_ADDR_FROM_SET = 0x04000000, /* source address is set */
- SI_FL_ADDR_TO_SET = 0x08000000 /* destination address is set */
};
/* A stream interface has 3 parts :
unsigned int flags; /* SI_FL_* */
struct conn_stream *cs; /* points to the conn-streams that owns the endpoint (connection or applet) */
struct si_ops *ops; /* general operations at the stream interface layer */
- struct sockaddr_storage *src; /* source address (pool), when known, otherwise NULL */
- struct sockaddr_storage *dst; /* destination address (pool), when known, otherwise NULL */
unsigned int exp; /* wake up time for connect, queue, turn-around, ... */
/* struct members below are the "remote" part, as seen from the buffer side */
*/
static inline int si_init(struct stream_interface *si)
{
- si->src = NULL;
- si->dst = NULL;
si->err_type = SI_ET_NONE;
si->exp = TICK_ETERNITY;
si->flags &= SI_FL_ISBACK;
}
}
-
-/* Returns the source address of the stream-int and, if not set, fallbacks on
- * the session for frontend SI and the server connection for the backend SI. It
- * returns a const address on success or NULL on failure.
- */
-static inline const struct sockaddr_storage *si_src(struct stream_interface *si)
-{
- if (si->flags & SI_FL_ADDR_FROM_SET)
- return si->src;
- if (!(si->flags & SI_FL_ISBACK))
- return sess_src(strm_sess(si_strm(si)));
- else {
- struct connection *conn = cs_conn(si->cs);
-
- if (conn)
- return conn_src(conn);
- }
- return NULL;
-}
-
-
-/* Returns the destination address of the stream-int and, if not set, fallbacks
- * on the session for frontend SI and the server connection for the backend
- * SI. It returns a const address on success or NULL on failure.
- */
-static inline const struct sockaddr_storage *si_dst(struct stream_interface *si)
-{
- if (si->flags & SI_FL_ADDR_TO_SET)
- return si->dst;
- if (!(si->flags & SI_FL_ISBACK))
- return sess_dst(strm_sess(si_strm(si)));
- else {
- struct connection *conn = cs_conn(si->cs);
-
- if (conn)
- return conn_dst(conn);
- }
- return NULL;
-}
-
-/* Retrieves the source address of the stream-int. Returns non-zero on success
- * or zero on failure. The operation is only performed once and the address is
- * stored in the stream-int for future use. On the first call, the stream-int
- * source address is copied from the session one for frontend SI and the server
- * connection for the backend SI.
- */
-static inline int si_get_src(struct stream_interface *si)
-{
- const struct sockaddr_storage *src = NULL;
-
- if (si->flags & SI_FL_ADDR_FROM_SET)
- return 1;
-
- if (!(si->flags & SI_FL_ISBACK))
- src = sess_src(strm_sess(si_strm(si)));
- else {
- struct connection *conn = cs_conn(si->cs);
-
- if (conn)
- src = conn_src(conn);
- }
- if (!src)
- return 0;
-
- if (!sockaddr_alloc(&si->src, src, sizeof(*src)))
- return 0;
-
- si->flags |= SI_FL_ADDR_FROM_SET;
- return 1;
-}
-
-/* Retrieves the destination address of the stream-int. Returns non-zero on
- * success or zero on failure. The operation is only performed once and the
- * address is stored in the stream-int for future use. On the first call, the
- * stream-int destination address is copied from the session one for frontend SI
- * and the server connection for the backend SI.
- */
-static inline int si_get_dst(struct stream_interface *si)
-{
- const struct sockaddr_storage *dst = NULL;
-
- if (si->flags & SI_FL_ADDR_TO_SET)
- return 1;
-
- if (!(si->flags & SI_FL_ISBACK))
- dst = sess_dst(strm_sess(si_strm(si)));
- else {
- struct connection *conn = cs_conn(si->cs);
-
- if (conn)
- dst = conn_dst(conn);
- }
- if (!dst)
- return 0;
-
- if (!sockaddr_alloc(&si->dst, dst, sizeof(*dst)))
- return 0;
-
- si->flags |= SI_FL_ADDR_TO_SET;
- return 1;
-}
-
#endif /* _HAPROXY_STREAM_INTERFACE_H */
/*
const struct sockaddr_storage *src;
case BE_LB_HASH_SRC:
- src = si_src(cs_si(s->csf));
+ src = cs_src(s->csf);
if (src && src->ss_family == AF_INET) {
srv = get_server_sh(s->be,
(void *)&((struct sockaddr_in *)src)->sin_addr,
* locally on multiple addresses at once. Nothing is done
* for AF_UNIX addresses.
*/
- dst = si_dst(cs_si(s->csf));
+ dst = cs_dst(s->csf);
if (dst && dst->ss_family == AF_INET) {
((struct sockaddr_in *)*ss)->sin_family = AF_INET;
((struct sockaddr_in *)*ss)->sin_addr =
if ((srv->flags & SRV_F_MAPPORTS)) {
int base_port;
- dst = si_dst(cs_si(s->csf));
+ dst = cs_dst(s->csf);
if (dst) {
/* First, retrieve the port from the incoming connection */
base_port = get_host_port(dst);
return SRV_STATUS_INTERNAL;
/* in transparent mode, use the original dest addr if no dispatch specified */
- dst = si_dst(cs_si(s->csf));
+ dst = cs_dst(s->csf);
if (dst && (dst->ss_family == AF_INET || dst->ss_family == AF_INET6))
**ss = *dst;
}
case CO_SRC_TPROXY_CLI:
case CO_SRC_TPROXY_CIP:
/* FIXME: what can we do if the client connects in IPv6 or unix socket ? */
- addr = si_src(cs_si(s->csf));
+ addr = cs_src(s->csf);
if (!addr)
return SRV_STATUS_INTERNAL;
srv = objt_server(s->target);
if (!(s->flags & SF_ADDR_SET)) {
- err = alloc_dst_address(&(cs_si(s->csb)->dst), srv, s);
+ err = alloc_dst_address(&s->csb->dst, srv, s);
if (err != SRV_STATUS_OK)
return SF_ERR_INTERNAL;
/* 3. destination address */
if (srv && (!is_addr(&srv->addr) || srv->flags & SRV_F_MAPPORTS))
- hash_params.dst_addr = cs_si(s->csb)->dst;
+ hash_params.dst_addr = s->csb->dst;
/* 4. source address */
hash_params.src_addr = bind_addr;
return SF_ERR_RESOURCE;
/* copy the target address into the connection */
- *srv_conn->dst = *(cs_si(s->csb))->dst;
+ *srv_conn->dst = *s->csb->dst;
/* Copy network namespace from client connection */
srv_conn->proxy_netns = cli_conn ? cli_conn->proxy_netns : NULL;
if (((s->flags & (SF_DIRECT|SF_FORCE_PRST)) == SF_DIRECT) &&
(s->be->options & PR_O_REDISP)) {
s->flags &= ~(SF_DIRECT | SF_ASSIGNED | SF_ADDR_SET);
- sockaddr_free(&(cs_si(s->csb)->dst));
+ sockaddr_free(&s->csb->dst);
goto redispatch;
}
}
}
- sockaddr_free(&(cs_si(s->csb)->dst));
+ sockaddr_free(&s->csb->dst);
cs_si(s->csb)->state = cs_si(s->csb)->prev_state = SI_ST_INI;
cs_si(s->csb)->err_type = SI_ET_NONE;
cs->app = NULL;
cs->si = NULL;
cs->data_cb = NULL;
-
+ cs->src = NULL;
+ cs->dst = NULL;
if (!endp) {
endp = cs_endpoint_new();
if (unlikely(!endp))
void cs_free(struct conn_stream *cs)
{
si_free(cs->si);
+ sockaddr_free(&cs->src);
+ sockaddr_free(&cs->dst);
if (cs->endp) {
BUG_ON(!(cs->endp->flags & CS_EP_DETACHED));
cs_endpoint_free(cs->endp);
cs->app = NULL;
cs->si = NULL;
cs->data_cb = NULL;
-
+ sockaddr_free(&cs->src);
+ sockaddr_free(&cs->dst);
if (!cs->endp || (cs->endp->flags & CS_EP_DETACHED))
cs_free(cs);
}
#include <haproxy/cfgparse.h>
#include <haproxy/connection.h>
#include <haproxy/conn_stream.h>
+#include <haproxy/cs_utils.h>
#include <haproxy/fd.h>
#include <haproxy/frontend.h>
#include <haproxy/hash.h>
memcpy(hdr->sig, pp2_signature, PP2_SIGNATURE_LEN);
if (strm) {
- src = si_src(strm->csf->si);
- dst = si_dst(strm->csf->si);
+ src = cs_src(strm->csf);
+ dst = cs_dst(strm->csf);
}
else if (remote && conn_get_src(remote) && conn_get_dst(remote)) {
src = conn_src(remote);
const struct sockaddr_storage *dst = NULL;
if (strm) {
- src = si_src(strm->csf->si);
- dst = si_dst(strm->csf->si);
+ src = cs_src(strm->csf);
+ dst = cs_dst(strm->csf);
}
else if (remote && conn_get_src(remote) && conn_get_dst(remote)) {
src = conn_src(remote);
}
s = DISGUISE(cs_strm(cs));
- cs_si(s->csb)->dst = addr;
+ s->csb->dst = addr;
cs_si(s->csb)->flags |= SI_FL_NOLINGER;
s->target = &ds->dss->srv->obj_type;
s->flags = SF_ASSIGNED|SF_ADDR_SET;
#include <haproxy/api.h>
#include <haproxy/arg.h>
#include <haproxy/chunk.h>
+#include <haproxy/connection.h>
+#include <haproxy/cs_utils.h>
#include <haproxy/fd.h>
#include <haproxy/frontend.h>
#include <haproxy/global.h>
s->do_log(s);
}
else if (conn) {
- src = si_src(cs_si(s->csf));
+ src = cs_src(s->csf);
if (!src)
send_log(fe, LOG_INFO, "Connect from unknown source to listener %d (%s/%s)\n",
l->luid, fe->id, (fe->mode == PR_MODE_HTTP) ? "HTTP" : "TCP");
switch (addr_to_str(src, pn, sizeof(pn))) {
case AF_INET:
case AF_INET6:
- dst = si_dst(cs_si(s->csf));
+ dst = cs_dst(s->csf);
if (dst) {
addr_to_str(dst, sn, sizeof(sn));
port = get_host_port(dst);
}
}
- src = si_src(cs_si(s->csf));
+ src = cs_src(s->csf);
if (!src) {
chunk_printf(&trash, "%08x:%s.accept(%04x)=%04x from [listener:%d] ALPN=%s\n",
s->uniq_id, fe->id, (unsigned short)l->rx.fd, (unsigned short)conn->handle.fd,
}
appctx = container_of(peer, struct appctx, ctx.hlua_cosocket.xref);
cs = appctx->owner;
- dst = si_dst(cs_opposite(cs)->si);
+ dst = cs_dst(cs_opposite(cs));
if (!dst) {
xref_unlock(&socket->xref, peer);
lua_pushnil(L);
cs = appctx->owner;
s = __cs_strm(cs);
- if (!sockaddr_alloc(&cs_opposite(cs)->si->dst, addr, sizeof(*addr))) {
+ if (!sockaddr_alloc(&cs_opposite(cs)->dst, addr, sizeof(*addr))) {
xref_unlock(&socket->xref, peer);
WILL_LJMP(luaL_error(L, "connect: internal error"));
}
#include <haproxy/channel.h>
#include <haproxy/check.h>
#include <haproxy/connection.h>
+#include <haproxy/conn_stream.h>
+#include <haproxy/cs_utils.h>
#include <haproxy/errors.h>
#include <haproxy/filters.h>
#include <haproxy/http.h>
* asks for it.
*/
if ((sess->fe->options | s->be->options) & PR_O_FWDFOR) {
- const struct sockaddr_storage *src = si_src(cs_si(s->csf));
+ const struct sockaddr_storage *src = cs_src(s->csf);
struct http_hdr_ctx ctx = { .blk = NULL };
struct ist hdr = isttest(s->be->fwdfor_hdr_name) ? s->be->fwdfor_hdr_name : sess->fe->fwdfor_hdr_name;
* asks for it.
*/
if ((sess->fe->options | s->be->options) & PR_O_ORGTO) {
- const struct sockaddr_storage *dst = si_dst(cs_si(s->csf));
+ const struct sockaddr_storage *dst = cs_dst(s->csf);
struct ist hdr = isttest(s->be->orgto_hdr_name) ? s->be->orgto_hdr_name : sess->fe->orgto_hdr_name;
if (dst && dst->ss_family == AF_INET) {
break;
}
- cs_si(s->csb)->dst = addr;
+ s->csb->dst = addr;
cs_si(s->csb)->flags |= SI_FL_NOLINGER;
s->flags |= SF_ASSIGNED|SF_ADDR_SET;
s->res.flags |= CF_READ_DONTWAIT;
#include <haproxy/channel.h>
#include <haproxy/chunk.h>
#include <haproxy/connection.h>
+#include <haproxy/cs_utils.h>
#include <haproxy/global.h>
#include <haproxy/h1.h>
#include <haproxy/h1_htx.h>
*/
static int smp_fetch_base32_src(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
- const struct sockaddr_storage *src = (smp->strm ? si_src(smp->strm->csf->si) : NULL);
+ const struct sockaddr_storage *src = (smp->strm ? cs_src(smp->strm->csf) : NULL);
struct buffer *temp;
if (!src)
*/
static int smp_fetch_url32_src(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
- const struct sockaddr_storage *src = (smp->strm ? si_src(smp->strm->csf->si) : NULL);
+ const struct sockaddr_storage *src = (smp->strm ? cs_src(smp->strm->csf) : NULL);
struct buffer *temp;
if (!src)
break;
case LOG_FMT_CLIENTIP: // %ci
- addr = (s ? si_src(cs_si(s->csf)) : sess_src(sess));
+ addr = (s ? cs_src(s->csf) : sess_src(sess));
if (addr)
ret = lf_ip(tmplog, (struct sockaddr *)addr, dst + maxsize - tmplog, tmp);
else
break;
case LOG_FMT_CLIENTPORT: // %cp
- addr = (s ? si_src(cs_si(s->csf)) : sess_src(sess));
+ addr = (s ? cs_src(s->csf) : sess_src(sess));
if (addr) {
/* sess->listener is always defined when the session's owner is an inbound connections */
if (addr->ss_family == AF_UNIX)
break;
case LOG_FMT_FRONTENDIP: // %fi
- addr = (s ? si_dst(cs_si(s->csf)) : sess_dst(sess));
+ addr = (s ? cs_dst(s->csf) : sess_dst(sess));
if (addr)
ret = lf_ip(tmplog, (struct sockaddr *)addr, dst + maxsize - tmplog, tmp);
else
break;
case LOG_FMT_FRONTENDPORT: // %fp
- addr = (s ? si_dst(cs_si(s->csf)) : sess_dst(sess));
+ addr = (s ? cs_dst(s->csf) : sess_dst(sess));
if (addr) {
/* sess->listener is always defined when the session's owner is an inbound connections */
if (addr->ss_family == AF_UNIX)
struct fcgi_strm_params *params)
{
struct connection *cli_conn = objt_conn(fstrm->sess->origin);
- const struct sockaddr_storage *src = (cs_check(fstrm->cs) ? conn_src(fconn->conn) : si_src(cs_opposite(fstrm->cs)->si));
- const struct sockaddr_storage *dst = (cs_check(fstrm->cs) ? conn_dst(fconn->conn) : si_dst(cs_opposite(fstrm->cs)->si));
+ const struct sockaddr_storage *src = (cs_check(fstrm->cs) ? conn_src(fconn->conn) : cs_src(cs_opposite(fstrm->cs)));
+ const struct sockaddr_storage *dst = (cs_check(fstrm->cs) ? conn_dst(fconn->conn) : cs_dst(cs_opposite(fstrm->cs)));
struct ist p;
if (!sl)
appctx_wakeup(appctx);
/* initiate an outgoing connection */
- cs_si(s->csb)->dst = addr;
+ s->csb->dst = addr;
cs_si(s->csb)->flags |= SI_FL_NOLINGER;
s->flags = SF_ASSIGNED|SF_ADDR_SET;
s->target = peer_session_target(peer, s);
/* the entry might have been redistributed to another server */
if (!(strm->flags & SF_ADDR_SET))
- sockaddr_free(&cs_si(strm->csb)->dst);
+ sockaddr_free(&strm->csb->dst);
if (p->target) {
/* a server picked this pendconn, it must skip LB */
}
s = DISGUISE(cs_strm(cs));
- cs_si(s->csb)->dst = addr;
+ s->csb->dst = addr;
cs_si(s->csb)->flags |= SI_FL_NOLINGER;
s->target = &sft->srv->obj_type;
return;
tasklet_free(si->wait_event.tasklet);
- sockaddr_free(&si->src);
- sockaddr_free(&si->dst);
pool_free(pool_head_streaminterface, si);
}
#include <haproxy/arg.h>
#include <haproxy/channel.h>
#include <haproxy/connection.h>
+#include <haproxy/cs_utils.h>
#include <haproxy/global.h>
#include <haproxy/http_rules.h>
#include <haproxy/proto_tcp.h>
case ACT_F_TCP_REQ_CNT:
case ACT_F_HTTP_REQ:
- if (!si_get_src(cs_si(s->csf)))
+ if (!cs_get_src(s->csf))
goto end;
- src = cs_si(s->csf)->src;
+ src = s->csf->src;
break;
default:
case ACT_F_TCP_REQ_CNT:
case ACT_F_HTTP_REQ:
- if (!si_get_dst(cs_si(s->csf)))
+ if (!cs_get_dst(s->csf))
goto end;
- dst = cs_si(s->csf)->dst;
+ dst = s->csf->dst;
break;
default:
case ACT_F_TCP_REQ_CNT:
case ACT_F_HTTP_REQ:
- if (!si_get_src(cs_si(s->csf)))
+ if (!cs_get_src(s->csf))
goto end;
- src = cs_si(s->csf)->src;
+ src = s->csf->src;
break;
default:
case ACT_F_TCP_REQ_CNT:
case ACT_F_HTTP_REQ:
- if (!si_get_dst(cs_si(s->csf)))
+ if (!cs_get_dst(s->csf))
goto end;
- dst = cs_si(s->csf)->dst;
+ dst = s->csf->dst;
break;
default:
#include <haproxy/api.h>
#include <haproxy/arg.h>
#include <haproxy/connection.h>
+#include <haproxy/cs_utils.h>
#include <haproxy/errors.h>
#include <haproxy/global.h>
#include <haproxy/listener-t.h>
src = conn_src(conn);
}
else /* src */
- src = (smp->strm ? si_src(smp->strm->csf->si) : sess_src(smp->sess));
+ src = (smp->strm ? cs_src(smp->strm->csf) : sess_src(smp->sess));
if (!src)
return 0;
src = conn_src(conn);
}
else /* src_port */
- src = (smp->strm ? si_src(smp->strm->csf->si) : sess_src(smp->sess));
+ src = (smp->strm ? cs_src(smp->strm->csf) : sess_src(smp->sess));
if (!src)
return 0;
dst = conn_dst(conn);
}
else /* dst */
- dst = (smp->strm ? si_dst(smp->strm->csf->si) : sess_dst(smp->sess));
+ dst = (smp->strm ? cs_dst(smp->strm->csf) : sess_dst(smp->sess));
if (!dst)
return 0;
dst = conn_dst(conn);
}
else /* dst_is_local */
- dst = (smp->strm ? si_dst(smp->strm->csf->si) : sess_dst(smp->sess));
+ dst = (smp->strm ? cs_dst(smp->strm->csf) : sess_dst(smp->sess));
if (!dst)
return 0;
src = conn_src(conn);
}
else /* src_is_local */
- src = (smp->strm ? si_src(smp->strm->csf->si) : sess_src(smp->sess));
+ src = (smp->strm ? cs_src(smp->strm->csf) : sess_src(smp->sess));
if (!src)
return 0;
dst = conn_dst(conn);
}
else /* dst_port */
- dst = (smp->strm ? si_dst(smp->strm->csf->si) : sess_dst(smp->sess));
+ dst = (smp->strm ? cs_dst(smp->strm->csf) : sess_dst(smp->sess));
if (!dst)
return 0;