From: Amaury Denoyelle Date: Thu, 1 Dec 2022 13:51:16 +0000 (+0100) Subject: MINOR: quic: test IP_PKTINFO support for quic-conn owned socket X-Git-Tag: v2.8-dev1~192 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8d46acdfcb49b4132f4a2ab7313315ca54e30ba0;p=thirdparty%2Fhaproxy.git 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. --- 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