]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Capture scope_id populated by fr_socket_bind
authorNick Porter <nick@portercomputing.co.uk>
Tue, 19 Aug 2025 16:41:18 +0000 (17:41 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Tue, 19 Aug 2025 17:14:51 +0000 (18:14 +0100)
scope_id is part of the comparison used to look for conflicting
listners.

If it is left at zero, then multiple interface specific listeners can't
be openned using the address 0.0.0.0 as is needed for handling DHCP
broadcast requests.

src/listen/dhcpv4/proto_dhcpv4_udp.c

index 467e237e61b9a1a689566b2d0cdd19913754e8aa..9cfb89fc4d0b7e1c26966120497a984b958ce807 100644 (file)
@@ -718,6 +718,7 @@ static int mod_open(fr_listen_t *li)
                PERROR("Failed binding socket");
                goto error;
        }
+       if (inst->interface) li->app_io_addr->inet.src_ipaddr.scope_id = ipaddr.scope_id;
 
        thread->sockfd = sockfd;