mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-02-20 09:51:15 +01:00
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 389a79d972)
This commit is contained in:
parent
d63541ff98
commit
69a4ca5e4a
1 changed files with 7 additions and 0 deletions
|
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue