1
0
mirror of https://github.com/simh/simh.git synced 2026-01-30 13:27:50 +00:00

ETHER: Fix recently introduced bug affecting tap on Linux

Fix #1230
This commit is contained in:
Mark Pizzolato
2025-10-18 12:03:54 -10:00
parent 271965ca99
commit dc82d6d017

View File

@@ -2921,8 +2921,10 @@ if (0 == strncmp("tap:", savname, 4)) {
tun = -1;
}
else {
*eth_api = ETH_API_TAP;
*fd_handle = (SOCKET)tun;
strcpy(savname, ifr.ifr_name);
return SCPE_OK;
}
}
else
@@ -2979,6 +2981,11 @@ if (0 == strncmp("tap:", savname, 4)) {
close(tun);
tun = -1;
}
else {
*eth_api = ETH_API_TAP;
*fd_handle = (SOCKET)tun;
return SCPE_OK;
}
}
#else /* !(defined(HAVE_BSDTUNTAP) && defined(HAVE_TAP_NETWORK)) */
strlcpy(errbuf, "No support for tap: devices", errbuf_size);