Changeset 23496 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Oct 2, 2009 3:22:39 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 53127
- Location:
- trunk/src/VBox/Devices/Network/slirp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/bootp.c
r23369 r23496 633 633 case DHCPRELEASE: 634 634 flag = 1; 635 #if 0636 case DHCPDECLINE:637 #endif638 635 rc = dhcp_decode_release(pData, bp, buf, size, flag); 639 636 if (rc > 0) 640 637 goto reply; 638 break; 639 case DHCPDECLINE: 640 p = dhcp_find_option(&bp->bp_vend[0], RFC2132_REQ_ADDR); 641 req_ip.s_addr = *(uint32_t *)(p + 2); 642 rc = bootp_cache_lookup_ether_by_ip(pData, req_ip.s_addr, NULL); 643 if (rc != 0) 644 { 645 /* Not registered */ 646 BOOTPClient *bc; 647 bc = bc_alloc_client(pData); 648 Assert(bc); 649 bc->addr.s_addr = req_ip.s_addr; 650 slirp_arp_who_has(pData, bc->addr.s_addr); 651 LogRel(("NAT: %R[IP4] has been already registered\n", &req_ip)); 652 } 653 /* no response required */ 641 654 break; 642 655 default: … … 729 742 int rc = 1; 730 743 int i; 731 if (ether == NULL)732 return rc;733 744 for (i = 0; i < NB_ADDR; i++) 734 745 { … … 736 747 && ip == bootp_clients[i].addr.s_addr) 737 748 { 738 memcpy(ether, bootp_clients[i].macaddr, ETH_ALEN);749 if(ether != NULL) memcpy(ether, bootp_clients[i].macaddr, ETH_ALEN); 739 750 rc = 0; 740 751 break; -
trunk/src/VBox/Devices/Network/slirp/bootp.h
r22664 r23496 71 71 #define DHCPOFFER 2 72 72 #define DHCPREQUEST 3 73 #define DHCPDECLINE 4 73 74 #define DHCPACK 5 74 75 #define DHCPNAK 6
Note:
See TracChangeset
for help on using the changeset viewer.