Changeset 9109 in vbox for trunk/src/VBox
- Timestamp:
- May 26, 2008 9:46:30 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/bootp.c
r8009 r9109 56 56 } 57 57 58 static voidrelease_addr(PNATState pData, struct in_addr *paddr)59 { 60 inti;58 static int release_addr(PNATState pData, struct in_addr *paddr) 59 { 60 unsigned i; 61 61 62 62 i = ntohl(paddr->s_addr) - START_ADDR - ntohl(special_addr.s_addr); 63 63 if (i >= NB_ADDR) 64 return ;64 return 0; 65 65 memset(bootp_clients[i].macaddr, '\0', 6); 66 66 bootp_clients[i].allocated = 0; 67 return 1; 67 68 } 68 69 … … 151 152 152 153 if (dhcp_msg_type == DHCPRELEASE) { 154 int rc; 153 155 ipv4_addr = ntohl(bp->bp_ciaddr.s_addr); 154 release_addr(pData, &bp->bp_ciaddr); 155 LogRel(("NAT: DHCP released IP address %u.%u.%u.%u\n", 156 rc = release_addr(pData, &bp->bp_ciaddr); 157 LogRel(("NAT: %s %u.%u.%u.%u\n", 158 rc ? "DHCP released IP address" : "Ignored DHCP release for IP address", 156 159 ipv4_addr >> 24, (ipv4_addr >> 16) & 0xff, (ipv4_addr >> 8) & 0xff, ipv4_addr & 0xff)); 157 160 dprintf("released addr=%08x\n", ntohl(bp->bp_ciaddr.s_addr));
Note:
See TracChangeset
for help on using the changeset viewer.