diff options
| author | Felix Fietkau | 2026-02-06 09:30:49 +0000 |
|---|---|---|
| committer | Felix Fietkau | 2026-02-16 08:09:16 +0000 |
| commit | 69a4ca5e4afdc122fa10ccd837ad0adafe17b642 (patch) | |
| tree | c5d3e05a23152fefb70d500244baaa228fd23303 | |
| parent | d63541ff9841853679b8ff49af72eec25aabf901 (diff) | |
| download | openwrt-69a4ca5e4afdc122fa10ccd837ad0adafe17b642.tar.gz | |
unetmsg: close all channels on network removal
network_close() only closed the listening socket without shutting down
established RX/TX connections. This left remote state in
core.remote_publish/core.remote_subscribe for hosts on the removed
network, causing stale entries in channel listings and failed routing
attempts.
Close all RX and TX channels before removing the network, which also
triggers remote state cleanup via network_rx_socket_close().
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 389a79d97230fbd31de98a7f8896302ad284c114)
| -rw-r--r-- | package/network/services/unetmsg/files/usr/share/ucode/unetmsg/unetmsgd-remote.uc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/package/network/services/unetmsg/files/usr/share/ucode/unetmsg/unetmsgd-remote.uc b/package/network/services/unetmsg/files/usr/share/ucode/unetmsg/unetmsgd-remote.uc index 54e77596f1..f6b0ef2d59 100644 --- a/package/network/services/unetmsg/files/usr/share/ucode/unetmsg/unetmsgd-remote.uc +++ b/package/network/services/unetmsg/files/usr/share/ucode/unetmsg/unetmsgd-remote.uc @@ -449,6 +449,13 @@ function network_close(name) net.timer.cancel(); net.handle.delete(); net.socket.close(); + + for (let peer, sock_data in net.rx_channels) + network_rx_socket_close(sock_data); + + for (let peer, sock_data in net.tx_channels) + network_tx_socket_close(sock_data); + delete networks[name]; } |