BUG/MINOR: quic: handle cases where we don't have an address

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.
This commit is contained in:
Maxime Henrion 2026-04-30 10:47:20 -04:00 committed by Amaury Denoyelle
parent cc231f3468
commit 55ba951f3d

View 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;