]> git.kaiwu.me - haproxy.git/commitdiff
BUG/MINOR: quic: handle cases where we don't have an address
authorMaxime Henrion <mhenrion@haproxy.com>
Thu, 30 Apr 2026 14:47:20 +0000 (10:47 -0400)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 30 Apr 2026 14:54:28 +0000 (16:54 +0200)
It is possible to not have addresses in certain conditions, so we now
also allow the address family to be AF_UNSPEC in quic_dgram_init().

No backport necessary since this code is not yet in a release.

src/quic_sock.c

index 4620e612fc3dc14234a85cf6450da6f384061aeb..291a5215339d768e5aba4e34af852d9ff622a504 100644 (file)
@@ -267,7 +267,8 @@ static void quic_dgram_init(struct quic_dgram *dgram,
                             struct sockaddr_storage *saddr,
                             struct sockaddr_storage *daddr)
 {
-       BUG_ON_HOT(!is_inet_addr(saddr) || !is_inet_addr(daddr));
+       BUG_ON_HOT(!is_inet_addr(saddr) ||
+                  (daddr->ss_family != AF_UNSPEC && !is_inet_addr(daddr)));
 
        dgram->obj_type = OBJ_TYPE_DGRAM;
        dgram->owner = owner;