- Timestamp:
- Jun 22, 2010 8:22:21 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/slirp.c
r30353 r30354 1401 1401 case ARPOP_REQUEST: 1402 1402 mr = m_getcl(pData, M_NOWAIT, MT_HEADER, M_PKTHDR); 1403 if ( mr == NULL)1403 if (!mr) 1404 1404 break; 1405 1405 reh = mtod(mr, struct ethhdr *); … … 1407 1407 rah = mtod(mr, struct arphdr *); 1408 1408 mr->m_len = sizeof(struct arphdr); 1409 Assert(mr);1410 1409 memcpy(reh->h_source, eh->h_source, ETH_ALEN); /* XXX: if_encap will swap src and dst*/ 1410 if ( 0 1411 1411 #ifdef VBOX_WITH_NAT_SERVICE 1412 if (tip == pData->special_addr.s_addr) 1413 goto arp_ok; 1414 #endif 1415 if ((htip & pData->netmask) == RT_N2H_U32(pData->special_addr.s_addr)) 1416 { 1417 if ( CTL_CHECK(htip, CTL_DNS) 1418 || CTL_CHECK(htip, CTL_ALIAS) 1419 || CTL_CHECK(htip, CTL_TFTP)) 1420 goto arp_ok; 1421 m_freem(pData, mr); 1422 break; 1423 1424 arp_ok: 1412 || (tip == pData->special_addr.s_addr) 1413 #endif 1414 || ( ((htip & pData->netmask) == RT_N2H_U32(pData->special_addr.s_addr)) 1415 && ( CTL_CHECK(htip, CTL_DNS) 1416 || CTL_CHECK(htip, CTL_ALIAS) 1417 || CTL_CHECK(htip, CTL_TFTP)) 1418 ) 1419 ) 1420 { 1425 1421 rah->ar_hrd = RT_H2N_U16_C(1); 1426 1422 rah->ar_pro = RT_H2N_U16_C(ETH_P_IP); … … 1452 1448 && memcmp(eh->h_dest, broadcast_ethaddr, ETH_ALEN) == 0) 1453 1449 { 1454 /* we've received anounce about address asignment1455 * Let's doARP cache update1450 /* We've received an announce about address assignment, 1451 * let's do an ARP cache update 1456 1452 */ 1457 1453 slirp_arp_cache_update_or_add(pData, *(uint32_t *)ah->ar_tip, &eh->h_dest[0]);
Note:
See TracChangeset
for help on using the changeset viewer.