From: Felix Fietkau Date: Mon, 16 Dec 2024 11:16:26 +0000 (+0100) Subject: pex-msg: enable broadcast for global PEX socket X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=486bc3b86dc2f278d09c69cd17bba33b6dd1fc7c;p=project%2Funetd.git pex-msg: enable broadcast for global PEX socket Fixes network data sync with broadcast addr Signed-off-by: Felix Fietkau --- 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));