Hi lsc, Thanks for the report. That's a curious bug indeed, especially given that it affects both implementations.
For the wireguard-go/wintun implementation, we're using setsockopt(IP_UNICAST_IF). For the wireguard-nt/kernel implementation, we're using IP_PKTINFO in a cmsghdr. Judging by the description of your report, it sounds like both of these cases are being ignored for some reason when hotspot mode is enabled. Having a functional IP_UNICAST_IF, and moreover a functional IP_PKTINFO, is extremely important for things to work properly, and without it you wind up with routing loops like the one you've described. It's actually not just wireguard that uses those too -- I was reading the msquic source last night and noticed that it does the same. So, hm. I'll have to try to make a test environment for that, though it might be slightly tricky given the hardware I have available. I'll see what I can do. Jason
