Skip to content

Commit dfcf449

Browse files
committed
Only override NODE_IP6 if link-local (fe80::)
1 parent 76fe73e commit dfcf449

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

action.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,14 @@ runs:
110110
exit 1
111111
fi
112112
113-
# Try forcibly setting an IP6 on the host
113+
# If the interface has a link-local address then
114+
# try forcibly setting an IP6 on the host
114115
# https://github.com/projectcalico/calico/issues/6443#issuecomment-1203759890
115-
sudo ip -6 addr add 2001:1001:1001:1001::1/64 dev eth0
116-
NODE_IP6=2001:1001:1001:1001::1
116+
if [[ "$NODE_IP6" == fe80* ]]; then
117+
echo "Link-local IPv6 found: $NODE_IP6, overriding"
118+
sudo ip -6 addr add 2001:1001:1001:1001::1/64 dev eth0
119+
NODE_IP6=2001:1001:1001:1001::1
120+
fi
117121
118122
if [[ "${{ inputs.ip-mode }}" = "dual" ]]; then
119123
echo K3S_CLUSTER_CIDR="10.42.0.0/16,2001:cafe:42::/56"

0 commit comments

Comments
 (0)