VirtualBox

Changeset 15891 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Jan 12, 2009 6:30:25 AM (16 years ago)
Author:
vboxsync
Message:

NAT: IP aligning doesn't really used in Slirp and real life

File:
1 edited

Legend:

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

    r15890 r15891  
    10721072    /* Note: we add to align the IP header */
    10731073
    1074     if (M_FREEROOM(m) < pkt_len + 2)
    1075     {
    1076        m_inc(m, pkt_len + 2);
    1077     }
    1078     m->m_len = pkt_len + 2;
    1079     memcpy(m->m_data + 2, pkt, pkt_len);
     1074    if (M_FREEROOM(m) < pkt_len)
     1075    {
     1076       m_inc(m, pkt_len);
     1077    }
     1078    m->m_len = pkt_len ;
     1079    memcpy(m->m_data, pkt, pkt_len);
    10801080
    10811081    proto = ntohs(*(uint16_t *)(pkt + 12));
     
    10941094             * the first outgoing connection gets an incorrect timestamp. */
    10951095            updtime(pData);
    1096             m->m_data += ETH_HLEN + 2;
    1097             m->m_len -= ETH_HLEN + 2;
     1096            m->m_data += ETH_HLEN;
     1097            m->m_len -= ETH_HLEN;
    10981098            ip_input(pData, m);
    10991099            break;
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