device: make device stage2 reentrant for NMDeviceAdsl

System Internals / NetworkManager - Thomas Haller [redhat.com] - 17 March 2020 07:13 EDT

Configuration stages like act_stage2_config() can postpone progressing to the next stage. Currently, when the condition that we wait for gets satisfied, the code schedules the next stage from there.

I think that is wrong, because when we postpone from act_stage2_config(), follow up steps of stage2 get skipped. Thus, when we are ready to progress, the class should enter stage 2 again.

This requires that stage2 becomes reentrant and that the code reenters the same stage.

ea3912b70 device: make device stage2 reentrant for NMDeviceAdsl
src/devices/adsl/nm-device-adsl.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)

Upstream: cgit.freedesktop.org


  • Share