Changeset 29506 in vbox
- Timestamp:
- May 17, 2010 7:14:47 AM (15 years ago)
- Location:
- trunk/src/VBox/Devices/Network/slirp
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/bootp.c
r29505 r29506 636 636 struct in_addr req_ip; 637 637 int fDhcpDiscover = 0; 638 uint8_t *parameter_list = NULL;639 638 struct mbuf *m = NULL; 640 639 … … 652 651 if (p == NULL) 653 652 return; 654 /*655 * We're going update dns list at least once per DHCP transaction (!not on every operation656 * within transaction), assuming that transaction can't be longer than 1 min.657 */658 if ( !pData->fUseHostResolver659 && ( pData->dnsLastUpdate == 0660 || curtime - pData->dnsLastUpdate > 60 * 1000)) /* one minute*/661 {662 uint8_t i = 2; /* i = 0 - tag, i == 1 - length */663 parameter_list = dhcp_find_option(&bp->bp_vend[0], RFC2132_PARAM_LIST);664 for (;parameter_list && i < parameter_list[1]; ++i)665 {666 if (parameter_list[i] == RFC1533_DNS)667 {668 slirp_release_dns_list(pData);669 slirp_init_dns_list(pData);670 pData->dnsLastUpdate = curtime;671 break;672 }673 }674 }675 653 676 654 #ifndef VBOX_WITH_SLIRP_BSD_MBUF -
trunk/src/VBox/Devices/Network/slirp/slirp.c
r29505 r29506 532 532 #endif /* !RT_OS_WINDOWS */ 533 533 534 int slirp_init_dns_list(PNATState pData)534 static int slirp_init_dns_list(PNATState pData) 535 535 { 536 536 TAILQ_INIT(&pData->pDnsList); … … 539 539 } 540 540 541 void slirp_release_dns_list(PNATState pData)541 static void slirp_release_dns_list(PNATState pData) 542 542 { 543 543 struct dns_entry *pDns = NULL; -
trunk/src/VBox/Devices/Network/slirp/slirp.h
r29505 r29506 341 341 void slirp_arp_cache_add(PNATState pData, uint32_t ip, const uint8_t *ether); 342 342 int slirp_arp_cache_update_or_add(PNATState pData, uint32_t dst, const uint8_t *mac); 343 int slirp_init_dns_list(PNATState pData);344 void slirp_release_dns_list(PNATState pData);345 343 #define MIN_MRU 128 346 344 #define MAX_MRU 16384 -
trunk/src/VBox/Devices/Network/slirp/slirp_state.h
r29505 r29506 175 175 struct in_addr tftp_server; 176 176 struct in_addr loopback_addr; 177 uint32_t dnsLastUpdate;178 177 uint32_t netmask; 179 178 #ifndef VBOX_WITH_NAT_SERVICE
Note:
See TracChangeset
for help on using the changeset viewer.