From 18ddfc9ad657ac12ce9b10e768beba1abd595dfc Mon Sep 17 00:00:00 2001 From: dissimulo Date: Tue, 21 Apr 2026 07:20:51 -0700 Subject: [PATCH] tmux-ip: fix DO metadata path (address -> ip_address) The DigitalOcean metadata endpoint for reserved/floating IPv4 is /metadata/v1/{reserved,floating}_ip/ipv4/ip_address, not .../address. The .../active check works but the wrong IP path returned an empty body, causing the script to silently fall through to ipify on every droplet with a reserved/floating IP attached. Verified on a droplet: curl .../reserved_ip/ipv4/ip_address -> 45.55.111.240 curl .../reserved_ip/ipv4/address -> (empty) --- .local/bin/tmux-ip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/tmux-ip b/.local/bin/tmux-ip index 0f589fca..03381491 100755 --- a/.local/bin/tmux-ip +++ b/.local/bin/tmux-ip @@ -19,7 +19,7 @@ do_anchor_ip() { for kind in reserved_ip floating_ip; do active=$($CURL "$META/$kind/ipv4/active" 2>/dev/null) || continue [ "$active" = "true" ] || continue - ip=$($CURL "$META/$kind/ipv4/address" 2>/dev/null) || continue + ip=$($CURL "$META/$kind/ipv4/ip_address" 2>/dev/null) || continue [ -n "$ip" ] && { printf '%s\n' "$ip"; return 0; } done return 1