Skip to content

Commit

Permalink
wireguard-registration: on openwrt24.10 the https check prints to stderr
Browse files Browse the repository at this point in the history
Error message is:
SSL error: NET - Sending information through the socket failed
The returncode behavior stays the same otherwise
  • Loading branch information
maurerle committed Dec 15, 2024
1 parent eed6d79 commit ee5bc04
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ if [ "$(uci get gluon.mesh_vpn.enabled)" = "true" ] || [ "$(uci get gluon.mesh_v
# check if registration has been done since last boot
if [ ! -f /tmp/WG_REGISTRATION_SUCCESSFUL ]; then
# Push public key to broker, test for https and use if supported
wget -q "https://[::1]"
if [ $? -eq 1 ]; then
ret=0
wget -q "https://[::1]" 2>/dev/null || ret=$?
# returns Network Failure =4 if https exists
# and Generic Error =1 if no ssl lib available
if [ $ret -eq 1 ]; then
PROTO=http
else
PROTO=https
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ SEGMENT=$(uci get gluon.core.domain)

# Push public key to broker and receive gateway data, test for https and use if supported
ret=0
wget -q "https://[::1]" || ret=$?
wget -q "https://[::1]" 2>/dev/null || ret=$?
# returns Network Failure =4 if https exists
# and Generic Error =1 if no ssl lib available
if [ "$ret" -eq 1 ]; then
Expand Down

0 comments on commit ee5bc04

Please sign in to comment.