Yicong-Huang commented on code in PR #7141:
URL: https://github.com/apache/texera/pull/7141#discussion_r3768738768


##########
bin/local-dev/main.sh:
##########
@@ -466,6 +466,40 @@ fi
 # Both platform probes follow the same two steps: the interface backing the
 # default route first (most reliable on a laptop that may have wifi +
 # thunderbolt + tailscale all active), then a scan as a fallback.
+_detect_host_lan_ip_windows() {
+    local idx="" iface_details="" local_ip=""
+
+    local 
virt_excl="vEthernet|WSL|Hyper-V|VirtualBox|Docker|Bridge|tap|tun|cni|flannel|cali|kube|Local|tailscale|zerotier|wg|McAfee"
+
+    # Use 'netsh interface ip show route' to find the interface 
+    # associated with the 0.0.0.0/0 (default) route.
+    idx=$(netsh interface ip show route 2>/dev/null | \
+            awk -v excl="$virt_excl" '{
+                for (i = 1; i < NF; i++) {
+                    if ($i == "0.0.0.0/0") {
+                        # Check if Gateway/Interface name (i+2) matches 
virtual pattern
+                        if ($(i+2) !~ excl) {

Review Comment:
   Verified: `main.sh:490-491` now filters on the adapter name from `show 
addresses`, so the gateway-IP column is out of the picture — on the 
two-default-route case Idx 22 no longer wins by default. Resolving this one.
   
   The `Local` token I asked you to drop in the same breath is still in the 
list, and now that the regex runs against real adapter names it bites. Fresh 
comment on `main.sh:472`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to