From 486bc3b86dc2f278d09c69cd17bba33b6dd1fc7c Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 16 Dec 2024 12:16:26 +0100 Subject: [PATCH] pex-msg: enable broadcast for global PEX socket Fixes network data sync with broadcast addr Signed-off-by: Felix Fietkau --- pex-msg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/pex-msg.c b/pex-msg.c index d7581b9..1d85b26 100644 --- a/pex-msg.c +++ b/pex-msg.c @@ -626,6 +626,7 @@ int pex_open(void *addr, size_t addr_len, pex_recv_cb_t cb, bool server) goto close_socket; } + setsockopt(fd, SOL_SOCKET, SO_BROADCAST, &yes, sizeof(yes)); setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)); setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &yes, sizeof(yes)); setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &no, sizeof(no)); -- 2.30.2