openwrt / packages

Community maintained packages for OpenWrt. Documentation for submitting pull requests is in CONTRIBUTING.md
GNU General Public License v2.0
4.01k stars 3.49k forks source link

ddns-scripts: verify_host_port hangs with GNU netcat #14364

Open zhangyoufu opened 3 years ago

zhangyoufu commented 3 years ago

Maintainer: @feckert Environment: whatever

Description: If GNU netcat is installed, -w option is detected and the script treat it as busybox nc compiled with extensions. However the -w 1 parameter in GNU netcat does not work the same way as busybox, and nc may hang forever.

ttyS0 commented 2 years ago

Well... till today it's still unsolved

GNU netcat help mentions

-c, --close                close connection on EOF from stdin

A temp workaround is to add -c to nc flags at https://github.com/openwrt/packages/blob/master/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh#L592

I don't have BusyBox nc ext version available so it's unclear whether this change will affect their nc.