diff --git a/include/haproxy/receiver-t.h b/include/haproxy/receiver-t.h index da40c15cd..5b45dc269 100644 --- a/include/haproxy/receiver-t.h +++ b/include/haproxy/receiver-t.h @@ -47,6 +47,7 @@ struct receiver { int fd; /* handle we receive from (fd only for now) */ unsigned int flags; /* receiver options (RX_F_*) */ struct protocol *proto; /* protocol this receiver belongs to */ + void *owner; /* receiver's owner (usually a listener) */ struct rx_settings *settings; /* points to the settings used by this receiver */ struct list proto_list; /* list in the protocol header */ /* warning: this struct is huge, keep it at the bottom */ diff --git a/src/listener.c b/src/listener.c index ef9b7d012..75115f463 100644 --- a/src/listener.c +++ b/src/listener.c @@ -564,6 +564,7 @@ int create_listeners(struct bind_conf *bc, const struct sockaddr_storage *ss, LIST_ADDQ(&bc->listeners, &l->by_bind); l->bind_conf = bc; l->rx.settings = &bc->settings; + l->rx.owner = l; l->rx.fd = fd; memcpy(&l->rx.addr, ss, sizeof(*ss)); MT_LIST_INIT(&l->wait_queue);