Changeset 48413 in vbox for trunk/src/VBox/NetworkServices
- Timestamp:
- Sep 10, 2013 2:49:33 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/NetworkServices/DHCP/VBoxNetDHCP.cpp
r48405 r48413 71 71 # undef INET_ADDRSTRLEN 72 72 # endif 73 # define INET_ADDRSTRLEN 16 73 # define INET_ADDRSTRLEN 16 74 74 #else 75 75 # include <netinet/in.h> … … 389 389 390 390 unsigned int i; 391 int count_strs;391 unsigned int count_strs; 392 392 com::SafeArray<BSTR> strs; 393 393 std::map<RTNETADDRIPV4, uint32_t> MapIp4Addr2Off; 394 394 395 395 hrc = m_NATNetwork->COMGETTER(LocalMappings)(ComSafeArrayAsOutParam(strs)); 396 if ( SUCCEEDED(hrc) 396 if ( SUCCEEDED(hrc) 397 397 && (count_strs = strs.size())) 398 398 { … … 404 404 uint32_t u32Off; 405 405 const char *pszLo2Off = com::Utf8Str(strs[i]).c_str(); 406 406 407 407 RT_ZERO(aszAddr); 408 408 409 409 pszTerm = RTStrStr(pszLo2Off, "="); 410 410 … … 412 412 && (pszTerm - pszLo2Off) <= INET_ADDRSTRLEN) 413 413 { 414 414 415 415 memcpy(aszAddr, pszLo2Off, (pszTerm - pszLo2Off)); 416 416 int rc = RTNetStrToIPv4Addr(aszAddr, &ip4addr); … … 445 445 if (MapIp4Addr2Off[addr] != 0) 446 446 { 447 addr.u = RT_H2N_U32(RT_N2H_U32(m_Ipv4Address.u & m_Ipv4Netmask.u) 447 addr.u = RT_H2N_U32(RT_N2H_U32(m_Ipv4Address.u & m_Ipv4Netmask.u) 448 448 + MapIp4Addr2Off[addr]); 449 449 } … … 451 451 continue; 452 452 } 453 453 454 454 confManager->addToAddressList(RTNET_DHCP_OPT_DNS, addr); 455 455 } … … 734 734 735 735 int rc = ConfigurationManager::extractRequestList(pDhcpMsg, cb, opt); 736 736 737 737 /* 3. Send of offer */ 738 738 NetworkManager *networkManager = NetworkManager::getNetworkManager(); 739 739 740 740 lease->fBinding = true; 741 741 lease->u64TimestampBindingStarted = RTTimeMilliTS();
Note:
See TracChangeset
for help on using the changeset viewer.