mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 08:40:09 +01:00
ndisc: abort handling IO in event_ready() if we are unable to switch namespace
It should never happen that we are unable to switch the namespace.
However, in case it does, we cannot just return G_SOURCE_CONTINUE,
because we will just endlessly trying to process IO without actually
reading from the socket.
This shouldn't happen, but the instance is hosed and something is
very wrong. No longer handle the socket to avoid an endless loop.
(cherry picked from commit d444fcde34)
This commit is contained in:
parent
efb9e2bc6b
commit
6631debaa3
1 changed files with 5 additions and 2 deletions
|
|
@ -497,8 +497,11 @@ event_ready (GIOChannel *source, GIOCondition condition, NMNDisc *ndisc)
|
|||
|
||||
_LOGD ("processing libndp events");
|
||||
|
||||
if (!nm_ndisc_netns_push (ndisc, &netns))
|
||||
return G_SOURCE_CONTINUE;
|
||||
if (!nm_ndisc_netns_push (ndisc, &netns)) {
|
||||
/* something is very wrong. Stop handling events. */
|
||||
priv->event_id = 0;
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
ndp_callall_eventfd_handler (priv->ndp);
|
||||
return G_SOURCE_CONTINUE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue