ddns-scripts: add curl source IP bind fallback#29776
Conversation
|
@feckert Hi, could you please take a look at this PR for |
feckert
left a comment
There was a problem hiding this comment.
Please bump the PKG_Release by one
|
Hi @feckert, thanks for taking the time to review! I've double-checked the code and would like to respectfully clarify the logic regarding those variables:
That being said, you are completely right about bumping the |
|
I do not think we should keep changing this PR to address the remaining CI failure. I re-checked the CI runs for this branch:
|
|
LGTM and thanks for your fix we are almost ready to merge. Just a quick note: Could you please adjust your commit descriptions so that they do not exceed the 80-character limit. And please move the increase in PKG_VERSION to a separate commit and set PKG_RELEASE to “1”, as you have updated PKG_VERSION already. thanks |
e65e941 to
cd5a0df
Compare
|
Done, thanks. I have updated the PR according to your request:
The branch has been force-pushed and should be ready for another look. |
cd5a0df to
b275876
Compare
Formality Check: FailedWe completed the verification flow. Please review the formatting overview logs below. 🛑 CRITICAL ERRORS
Something broken? Consider reporting an issue. |
Keep the existing cURL bind_network behavior of binding to the logical device first. This preserves the behavior introduced for PPPoE and multi-WAN setups where the selected network must also be used for the DDNS update request. Some setups can still fail when libcurl binds directly to the logical PPP device. In that case the transfer may time out even though binding to the source address of the same network succeeds. This can make DDNS updates fail repeatedly on affected systems. Retry cURL transfers once with the network source IP when the device-bound transfer fails. This leaves the normal path unchanged, keeps the update request on the same network, and matches the existing GNU Wget behavior which already binds to the network IP address. Also document the implicit bind_network default and the cURL fallback in the sample configuration. Signed-off-by: shaoxia <admin@shaoxia.xyz>
The /usr/bin/ddns frontend did not support a version option, so generic package tests treated it as an executable that could not report the package version. Read the installed version file and support -V/--version, matching the version output style used by dynamic_dns_updater.sh. Signed-off-by: shaoxia <admin@shaoxia.xyz>
Add the missing spaces around the test bracket in the one.com pre-removal script and escape IPKG_INSTROOT consistently with the other subpackages. Signed-off-by: shaoxia <admin@shaoxia.xyz>
Bump PKG_VERSION for the ddns-scripts changes and reset PKG_RELEASE to 1 as requested. Signed-off-by: shaoxia <admin@shaoxia.xyz>
b275876 to
289f05a
Compare
This fixes a long-standing failure mode in the cURL transfer path when
bind_networkis active.ddns-scriptshas defaultedbind_networkfromip_source=networksince 2020, and cURL has bound that network by logical device since the PPPoE fix in 2021. That device binding is still the right first choice because it preserves the existing PPPoE and multi-WAN behavior.However, on some PPPoE setups libcurl can fail when bound to the logical PPP device while the same request succeeds when bound to the source address of that same network. In the observed case,
curl --interface pppoe-wanto the HE.net update endpoint timed out with the TCP connection stuck inSYN_SENT, whilecurl --interface <wan-ip>succeeded immediately.This PR keeps the current behavior as the primary path and only retries once with the network source IP when the device-bound cURL transfer fails. That keeps existing users on the original code path unless it fails, preserves the selected network for multi-WAN setups, and makes cURL consistent with the existing GNU Wget path, which already binds to the network IP address.
The sample configuration is also updated to document the implicit
bind_networkdefault and the cURL fallback behavior.Tested:
bash -n net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.shgit diff --check HEAD~1..HEADdyn.dns.he.net.