Skip to content

Commit

Permalink
add peer hostname to log
Browse files Browse the repository at this point in the history
  • Loading branch information
T0biii authored and grische committed Mar 26, 2024
1 parent 7200397 commit b45d288
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,12 @@ use_api_v2() {
use_api_v1
else
logger -p debug -t checkuplink "Successfully parsed wgkex broker data"
PEER_ADDRESS="$(echo "$data" | sed -n 1p)"
PEER_HOST="$(echo "$data" | sed -n 1p)"
PEER_PORT="$(echo "$data" | sed -n 2p)"
PEER_PUBLICKEY="$(echo "$data" | sed -n 3p)"
PEER_LINKADDRESS=$(echo "$data" | sed -n 4p)

PEER_ADDRESS="$(resolve_host "$PEER_ADDRESS")"
PEER_ADDRESS="$(resolve_host "$PEER_HOST")"
PEER_ENDPOINT="$(combine_ip_port "$PEER_ADDRESS" "$PEER_PORT")"
fi
}
Expand Down Expand Up @@ -284,7 +284,7 @@ else

fi

logger -p info -t checkuplink "Connecting to $PEER_ENDPOINT"
logger -p info -t checkuplink "Connecting to $PEER_HOST($PEER_ENDPOINT)"

# Bring up the wireguard interface
ip link add dev "$MESH_VPN_IFACE" type wireguard
Expand Down

0 comments on commit b45d288

Please sign in to comment.