packages
packages copied to clipboard
ddns-scripts: fix luci XHR timeout when restarting ddns service
📦 Package Details
Maintainer: @feckert
Description: Redirect stdout and stderr to /dev/null when starting/restarting the ddns service in the background. Without this redirection, file descriptors are inherited by the child process, preventing proper process detachment and causing luci's XHR requests to timeout when using.
Both, start and restart actions are affected by this issue
🧪 Run Testing Details
- OpenWrt Version:24.10.4-r28959-29397011cc
Other versions are also affected (Found this on a commercial router running some 21.02)
Without changes
curl 'http://192.168.1.250/ubus/?1765142364195' \
-X POST \
-H 'Referer: http://192.168.1.250/cgi-bin/luci/admin/services/ddns' \
--data-raw '[{"jsonrpc":"2.0","id":47,"method":"call","params":["f1f750f0759e06723be41c4df8ff0d42","file","exec",{"command":"/usr/lib/ddns/dynamic_dns_lucihelper.sh","params":["-S","duckdns","--","start"],"env":null}]}]'
curl: (18) transfer closed with outstanding read data remaining
[%
With these changes
curl 'http://192.168.1.250/ubus/?1765142364195' \
-X POST \
-H 'Referer: http://192.168.1.250/cgi-bin/luci/admin/services/ddns' \
--data-raw '[{"jsonrpc":"2.0","id":47,"method":"call","params":["f1f750f0759e06723be41c4df8ff0d42","file","exec",{"command":"/usr/lib/ddns/dynamic_dns_lucihelper.sh","params":["-S","duckdns","--","restart"],"env":null}]}]'
[{"jsonrpc":"2.0","id":47,"result":[0,{"code":0}]}]%
✅ Formalities
- [x] I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.