[PATCH 0/5] ltq-vdsl-*-app: improve shutdown handling

Jan Hoffmann jan at 3e8.eu
Fri Jul 12 06:49:48 PDT 2024


Currently, the DSL connection stays active when the control daemon is
stopped using its "quit" command, and for VR11 also when using SIGINT.
As there is no way to control the connection with the daemon stopped
and restarting it always causes a re-connection, this behaviour isn't
really useful. So, make sure to also stop the connection in these cases.

For VR11, a clean shutdown using a L3 request is now tried before the
modem is deactivated. In my tests with a Netsys NV-202 on the other end,
it actually does result in a clean disconnection (without it, the
far-end LOSS counter increases by 10 for every disconnection).

The VR9 driver has the same API, but it seems to always fail (nReturn=-1
because the firmware returns the unknown fail reason status code 160).

(This new feature also opens a small cosmetic issue, as the init script
sends a hotplug event immediately on stopping, while the L3 request may
take a few seconds to become effective. However, I don't see any way to
fix this other than moving the call of the hotplug script to the daemon,
which is probably not worth it.)

Jan Hoffmann (5):
  ltq-vdsl-vr9-app: fix error handling during disconnection
  ltq-vdsl-vr11-app: fix error handling during disconnection
  ltq-vdsl-vr9-app: always disconnect on exit
  ltq-vdsl-vr11-app: always disconnect on exit
  ltq-vdsl-vr11-app: perform orderly shutdown on exit

 .../network/config/ltq-vdsl-vr11-app/Makefile |   2 +-
 .../ltq-vdsl-vr11-app/files/dsl_control       |   1 +
 .../patches/200-autoboot.patch                | 126 +++++++++++++-----
 .../patches/201-orderly-shutdown.patch        |  73 ++++++++++
 .../ltq-vdsl-vr11-app/patches/300-ubus.patch  |   4 +-
 .../network/config/ltq-vdsl-vr9-app/Makefile  |   2 +-
 .../patches/200-autoboot.patch                |  54 +++++---
 .../patches/201-sigterm.patch                 |   4 +-
 .../ltq-vdsl-vr9-app/patches/300-ubus.patch   |   4 +-
 9 files changed, 210 insertions(+), 60 deletions(-)
 create mode 100644 package/network/config/ltq-vdsl-vr11-app/patches/201-orderly-shutdown.patch

-- 
2.45.2




More information about the openwrt-devel mailing list