Skip to content

Commit

Permalink
format original interface address for matching
Browse files Browse the repository at this point in the history
  • Loading branch information
realies authored Apr 24, 2024
1 parent 545474e commit 86cf969
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion root/etc/s6-overlay/s6-rc.d/init-wireguard-confs/run
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ DUDE"
else
for idx in {2..254}; do
PROPOSED_IP="${INTERFACE}.${idx}/32"
if ! grep -q -R "${PROPOSED_IP}" /config/peer*/*.conf 2>/dev/null && ([[ -z "${ORIG_INTERFACE}" ]] || ! grep -q -R "${ORIG_INTERFACE}.${idx}" /config/peer*/*.conf 2>/dev/null); then
if ! grep -q -R "${PROPOSED_IP}" /config/peer*/*.conf 2>/dev/null && ([[ -z "${ORIG_INTERFACE}" ]] || ! grep -q -R "${ORIG_INTERFACE}.${idx}/32" /config/peer*/*.conf 2>/dev/null); then
CLIENT_IP="${PROPOSED_IP}"
break
fi
Expand Down

0 comments on commit 86cf969

Please sign in to comment.