Changeset 25799 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Jan 13, 2010 10:29:59 AM (15 years ago)
- Location:
- trunk/src/VBox/Devices/Network
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DrvNAT.cpp
r25402 r25799 1160 1160 if (pipe(&fds[0]) != 0) /** @todo RTPipeCreate() or something... */ 1161 1161 { 1162 intrc = RTErrConvertFromErrno(errno);1162 rc = RTErrConvertFromErrno(errno); 1163 1163 AssertRC(rc); 1164 1164 return rc; -
trunk/src/VBox/Devices/Network/slirp/ip_input.c
r25276 r25799 108 108 { 109 109 int rc; 110 STAM_PROFILE_START(&pData->StatALIAS_input, a);110 STAM_PROFILE_START(&pData->StatALIAS_input, b); 111 111 rc = LibAliasIn(select_alias(pData, m), mtod(m, char *), m->m_len); 112 STAM_PROFILE_STOP(&pData->StatALIAS_input, a);112 STAM_PROFILE_STOP(&pData->StatALIAS_input, b); 113 113 Log2(("NAT: LibAlias return %d\n", rc)); 114 114 if (m->m_len != ntohs(ip->ip_len)) -
trunk/src/VBox/Devices/Network/slirp/slirp.c
r25753 r25799 70 70 # define readfds_poll (POLLRDNORM) 71 71 # define writefds_poll (POLLWRNORM) 72 # define xfds_poll (POLLRDBAND|POLLWRBAND|POLLPRI)73 72 # else 74 73 # define readfds_poll (POLLIN) 75 74 # define writefds_poll (POLLOUT) 76 # define xfds_poll (POLLPRI)77 75 # endif 76 # define xfds_poll (POLLPRI) 78 77 # define closefds_poll (POLLHUP) 79 78 # define rderr_poll (POLLERR) … … 367 366 char buff2[256]; 368 367 RTFILE f; 369 int f ound= 0;368 int fFoundNameserver = 0; 370 369 struct in_addr tmp_addr; 371 370 int rc; … … 439 438 } 440 439 TAILQ_INSERT_HEAD(&pData->pDnsList, pDns, de_list); 441 f ound++;440 fFoundNameserver++; 442 441 } 443 442 if ((!strncmp(buff, "domain", 6) || !strncmp(buff, "search", 6))) … … 446 445 char *saveptr; 447 446 struct dns_domain_entry *pDomain = NULL; 448 int f ound= 0;447 int fFoundDomain = 0; 449 448 tok = strtok_r(&buff[6], " \t\n", &saveptr); 450 449 LIST_FOREACH(pDomain, &pData->pDomainList, dd_list) … … 453 452 && strcmp(tok, pDomain->dd_pszDomain) == 0) 454 453 { 455 f ound= 1;454 fFoundDomain = 1; 456 455 break; 457 456 } 458 457 } 459 if (tok != NULL && found == 0)458 if (tok != NULL && !fFoundDomain) 460 459 { 461 460 pDomain = RTMemAllocZ(sizeof(struct dns_domain_entry)); … … 472 471 } 473 472 RTFileClose(f); 474 if (!f ound)473 if (!fFoundNameserver) 475 474 return -1; 476 475 return 0; … … 1017 1016 if (time_fasttimo && ((curtime - time_fasttimo) >= 2)) 1018 1017 { 1019 STAM_PROFILE_START(&pData->StatFastTimer, a);1018 STAM_PROFILE_START(&pData->StatFastTimer, b); 1020 1019 tcp_fasttimo(pData); 1021 1020 time_fasttimo = 0; 1022 STAM_PROFILE_STOP(&pData->StatFastTimer, a);1021 STAM_PROFILE_STOP(&pData->StatFastTimer, b); 1023 1022 } 1024 1023 if (do_slowtimo && ((curtime - last_slowtimo) >= 499)) 1025 1024 { 1026 STAM_PROFILE_START(&pData->StatSlowTimer, a);1025 STAM_PROFILE_START(&pData->StatSlowTimer, c); 1027 1026 ip_slowtimo(pData); 1028 1027 tcp_slowtimo(pData); 1029 1028 last_slowtimo = curtime; 1030 STAM_PROFILE_STOP(&pData->StatSlowTimer, a);1029 STAM_PROFILE_STOP(&pData->StatSlowTimer, c); 1031 1030 } 1032 1031 } … … 1777 1776 { 1778 1777 struct socket *so; 1779 struct alias_link * link;1778 struct alias_link *alias_link; 1780 1779 struct libalias *lib; 1781 1780 int flags; … … 1845 1844 1846 1845 alias.s_addr = htonl(ntohl(guest_addr) | CTL_ALIAS); 1847 link = LibAliasRedirectPort(lib, psin->sin_addr, htons(rule->host_port),1848 alias, htons(rule->guest_port),1849 pData->special_addr, -1, /* not very clear for now */1850 rule->proto);1851 if (! link)1846 alias_link = LibAliasRedirectPort(lib, psin->sin_addr, htons(rule->host_port), 1847 alias, htons(rule->guest_port), 1848 pData->special_addr, -1, /* not very clear for now */ 1849 rule->proto); 1850 if (!alias_link) 1852 1851 goto remove_port_forwarding; 1853 1852
Note:
See TracChangeset
for help on using the changeset viewer.