mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-02-20 02:21:19 +01:00
unetmsg: fix inverted condition in network_rx_socket_close()
The cleanup condition checked != instead of ==, inverting the logic.
This caused two problems:
When an authenticated RX connection disconnected, remote state for that
host was never cleaned up since the stored entry matched the one being
closed.
When a stale unauthenticated connection from a peer closed, any existing
authenticated connection from the same peer was incorrectly deleted and
its remote state wiped.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit f09596f84f)
This commit is contained in:
parent
ef79f65981
commit
d63541ff98
1 changed files with 1 additions and 1 deletions
|
|
@ -62,7 +62,7 @@ function network_rx_socket_close(data)
|
|||
|
||||
core.dbg(`Incoming connection from ${data.name} closed\n`);
|
||||
let net = networks[data.network];
|
||||
if (net && net.rx_channels[data.name] != data) {
|
||||
if (net && net.rx_channels[data.name] == data) {
|
||||
delete net.rx_channels[data.name];
|
||||
network_rx_cleanup_state(data.name);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue