1
0
mirror of https://github.com/rcornwell/sims.git synced 2026-04-14 23:58:21 +00:00

SCP: Updated to current.

This commit is contained in:
Richard Cornwell
2019-09-05 21:48:41 -04:00
parent 0bc87490aa
commit 5e4784be36
3 changed files with 6 additions and 4 deletions

View File

@@ -1572,10 +1572,10 @@ static void eth_get_nic_hw_addr(ETH_DEV* dev, const char *devname)
memset(command, 0, sizeof(command));
/* try to force an otherwise unused interface to be turned on */
snprintf(command, sizeof(command)-1, "ifconfig %s up", devname);
snprintf(command, sizeof(command)-1, "ifconfig %.*s up", (int)(sizeof(command) - 14), devname);
(void)system(command);
for (i=0; patterns[i] && (0 == dev->have_host_nic_phy_addr); ++i) {
snprintf(command, sizeof(command)-1, "ifconfig %s | %s >NIC.hwaddr", devname, patterns[i]);
snprintf(command, sizeof(command)-1, "ifconfig %.*s | %s >NIC.hwaddr", (int)(sizeof(command) - (26 + strlen(patterns[i]))), devname, patterns[i]);
(void)system(command);
if (NULL != (f = fopen("NIC.hwaddr", "r"))) {
while (0 == dev->have_host_nic_phy_addr) {
@@ -2118,7 +2118,9 @@ else { /* !tap: */
while (isspace(*devname))
++devname;
if ((*handle = (void*) sim_slirp_open(devname, opaque, &_slirp_callback, dptr, dbit, errbuf, PCAP_ERRBUF_SIZE))) {
if (!(*handle = (void*) sim_slirp_open(devname, opaque, &_slirp_callback, dptr, dbit, errbuf, PCAP_ERRBUF_SIZE)))
strlcpy(errbuf, strerror(errno), PCAP_ERRBUF_SIZE);
else {
*eth_api = ETH_API_NAT;
*fd_handle = 0;
}

View File

@@ -1232,7 +1232,7 @@ for (i = 0; i < mp->lines; i++) { /* check each line in se
++mp->sessions; /* count the new session */
if (lp->destination) { /* Virtual Null Modem Cable? */
char host[CBUFSIZE];
char host[sizeof(msg) - 64];
if (sim_parse_addr (lp->destination, host, sizeof(host), NULL, NULL, 0, NULL, address)) {
tmxr_msg (newsock, "Rejecting connection from unexpected source\r\n");

BIN
sims.bz2 Normal file

Binary file not shown.