VirtualBox

Ignore:
Timestamp:
Aug 18, 2009 7:42:12 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
51191
Message:

NAT: allocate intermediate buffer in case Slirp will really send packet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/slirp.c

    r22240 r22315  
    14661466{
    14671467    struct ethhdr *eh;
    1468     uint8_t *buf = RTMemAlloc(1600);
     1468    uint8_t *buf = NULL;
    14691469    STAM_PROFILE_START(&pData->StatIF_encap, a);
    14701470
     
    14901490        }
    14911491    }
    1492 
     1492    buf = RTMemAlloc(1600);
     1493    if (buf == NULL)
     1494    {
     1495        LogRel(("NAT: Can't alloc memory for outgoing buffer\n"));
     1496        goto done;
     1497    }
    14931498    eh->h_proto = htons(eth_proto);
    14941499    memcpy(buf, mtod(m, uint8_t *), m->m_len);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette