There are some cases where it's apparently possible to delete the loopback route (127.0.0.0/8) on Windows. This prevents the IPv4-based dumb_socketpair from working, and it appears to be very difficult to recreate the required loopback route. Yay, Windows 🤷♂️.
This breaks OpenConnect for users who run route /f to nuke their routing table (presumably out of sheer desperation… yay, Windows again) and then reconnect to a network.
It seems that there is a way to make dumb_socketpair sidestep IPv4 brokenness altogether, since AF_UNIX+SOCK_STREAM are available on Windows 10+.
Implementing dumb_socketpair with AF_UNIX sockets would be simpler and more reliable. The function could try using AF_UNIX sockets first, and only fallback to the IPv4-based approach if that fails.
There are some cases where it's apparently possible to delete the loopback route (
127.0.0.0/8) on Windows. This prevents the IPv4-baseddumb_socketpairfrom working, and it appears to be very difficult to recreate the required loopback route. Yay, Windows 🤷♂️.This breaks OpenConnect for users who run
route /fto nuke their routing table (presumably out of sheer desperation… yay, Windows again) and then reconnect to a network.It seems that there is a way to make
dumb_socketpairsidestep IPv4 brokenness altogether, sinceAF_UNIX+SOCK_STREAMare available on Windows 10+.Implementing
dumb_socketpairwithAF_UNIXsockets would be simpler and more reliable. The function could try usingAF_UNIXsockets first, and only fallback to the IPv4-based approach if that fails.