Commit 6ddae87
committed
fix: fall back to IPv4 bind address when IPv6 is disabled
Commit 84a119f switched --bind-addr to "[::]:8443" for dual-stack, but
binding fails with EAFNOSUPPORT when IPv6 is disabled in the kernel,
leaving code-server unreachable. Detect IPv6 via /proc/net/if_inet6 and
fall back to 0.0.0.0:8443 when it is unavailable.1 parent 84a119f commit 6ddae87
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
21 | 30 | | |
22 | 31 | | |
23 | 32 | | |
24 | 33 | | |
25 | 34 | | |
26 | | - | |
| 35 | + | |
27 | 36 | | |
28 | 37 | | |
29 | 38 | | |
| |||
0 commit comments