From 8d46acdfcb49b4132f4a2ab7313315ca54e30ba0 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Thu, 1 Dec 2022 14:51:16 +0100 Subject: [PATCH] MINOR: quic: test IP_PKTINFO support for quic-conn owned socket Extend the startup platform detection support test for quic-conn owned socket. It is required to be able to retrieve destination address on a recvfrom() system call so check if IP_PKTINFO or IP_RECVDSTADDR flags are supported. This change is part of quic-conn owned socket implementation. It may be backported to 2.7 after a period of observation. --- src/proto_quic.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/proto_quic.c b/src/proto_quic.c index 003e510b64..9dd96337fe 100644 --- a/src/proto_quic.c +++ b/src/proto_quic.c @@ -581,6 +581,15 @@ static int quic_test_sock_per_conn_support(struct listener *l) const struct receiver *rx = &l->rx; int ret = 1, fdtest; + /* Check if IP destination address can be retrieved on recvfrom() + * operation. + */ +#if !defined(IP_PKTINFO) && !defined(IP_RECVDSTADDR) + ha_alert("Your platform does not seem to support UDP source address retrieval through IP_PKTINFO or an alternative flag. " + "QUIC connections will use listener socket.\n"); + ret = 0; +#endif + /* Check if platform support multiple UDP sockets bind on the same * local address. Create a dummy socket and bind it on the same address * as listener. If bind system call fails, deactivate socket per -- 2.47.3