mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 12:18:13 +02: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 commitd444fcde34) (cherry picked from commit6631debaa3) (cherry picked from commit5c56404dfc)
This commit is contained in:
parent
9a06bb2b7b
commit
ba6490e00e
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