Changeset 30353 in vbox
- Timestamp:
- Jun 22, 2010 8:09:41 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/slirp.c
r30350 r30353 1402 1402 mr = m_getcl(pData, M_NOWAIT, MT_HEADER, M_PKTHDR); 1403 1403 if (mr == NULL) 1404 return;1404 break; 1405 1405 reh = mtod(mr, struct ethhdr *); 1406 1406 mr->m_data += ETH_HLEN; … … 1419 1419 || CTL_CHECK(htip, CTL_TFTP)) 1420 1420 goto arp_ok; 1421 m_freem(pData, m);1422 1421 m_freem(pData, mr); 1423 return;1422 break; 1424 1423 1425 1424 arp_ok: … … 1445 1444 if_encap(pData, ETH_P_ARP, mr, ETH_ENCAP_URG); 1446 1445 } 1446 else 1447 m_freem(pData, mr); 1448 1447 1449 /* Gratuitous ARP */ 1448 1450 if ( *(uint32_t *)ah->ar_sip == *(uint32_t *)ah->ar_tip … … 1453 1455 * Let's do ARP cache update 1454 1456 */ 1455 if (slirp_arp_cache_update(pData, *(uint32_t *)ah->ar_tip, &eh->h_dest[0]) == 0) 1456 { 1457 m_freem(pData, m); 1458 break; 1459 } 1460 slirp_arp_cache_add(pData, *(uint32_t *)ah->ar_tip, &eh->h_dest[0]); 1457 slirp_arp_cache_update_or_add(pData, *(uint32_t *)ah->ar_tip, &eh->h_dest[0]); 1461 1458 } 1462 1459 break; 1463 1460 1464 1461 case ARPOP_REPLY: 1465 if (slirp_arp_cache_update(pData, *(uint32_t *)ah->ar_sip, &ah->ar_sha[0]) == 0) 1466 { 1467 m_freem(pData, m); 1468 break; 1469 } 1470 slirp_arp_cache_add(pData, *(uint32_t *)ah->ar_sip, ah->ar_sha); 1471 m_freem(pData, m); 1462 slirp_arp_cache_update_or_add(pData, *(uint32_t *)ah->ar_sip, &ah->ar_sha[0]); 1472 1463 break; 1473 1464 … … 1475 1466 break; 1476 1467 } 1468 1469 m_freem(pData, m); 1477 1470 } 1478 1471
Note:
See TracChangeset
for help on using the changeset viewer.