Do not perform local ip check when you have an IP specified already

Use local address when setting up ALPN server, if specified
This commit is contained in:
FlyveHest 2019-07-11 21:57:31 +02:00
parent fe5f34231b
commit 2ecfb23dda

View File

@ -3182,7 +3182,10 @@ _on_before_issue() {
_netprc="$(_ss "$_checkport" | grep "$_checkport")" _netprc="$(_ss "$_checkport" | grep "$_checkport")"
netprc="$(echo "$_netprc" | grep "$_checkaddr")" netprc="$(echo "$_netprc" | grep "$_checkaddr")"
if [ -z "$netprc" ]; then if [ -z "$netprc" ]; then
netprc="$(echo "$_netprc" | grep "$LOCAL_ANY_ADDRESS")" # Only check for local bindings when you aren't looking for a specific IP
if [ -z "$_checkaddr" ]; then
netprc="$(echo "$_netprc" | grep "$LOCAL_ANY_ADDRESS")"
fi
fi fi
if [ "$netprc" ]; then if [ "$netprc" ]; then
_err "$netprc" _err "$netprc"
@ -4247,6 +4250,7 @@ $_authorizations_map"
fi fi
elif [ "$vtype" = "$VTYPE_ALPN" ]; then elif [ "$vtype" = "$VTYPE_ALPN" ]; then
_ncaddr="$(_getfield "$_local_addr" "$_ncIndex")"
acmevalidationv1="$(printf "%s" "$keyauthorization" | _digest "sha256" "hex")" acmevalidationv1="$(printf "%s" "$keyauthorization" | _digest "sha256" "hex")"
_debug acmevalidationv1 "$acmevalidationv1" _debug acmevalidationv1 "$acmevalidationv1"
if ! _starttlsserver "$d" "" "$Le_TLSPort" "$keyauthorization" "$_ncaddr" "$acmevalidationv1"; then if ! _starttlsserver "$d" "" "$Le_TLSPort" "$keyauthorization" "$_ncaddr" "$acmevalidationv1"; then