VirtualBox

Changeset 23240 in vbox


Ignore:
Timestamp:
Sep 23, 2009 3:05:17 AM (15 years ago)
Author:
vboxsync
Message:

NAT: update ip pointer on each m_cat.

File:
1 edited

Legend:

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

    r23155 r23240  
    480480    q = fp->ipq_frags;
    481481    ip = GETIP(q);
    482     if (next + (ip->ip_hl << 2) > IP_MAXPACKET)
     482    hlen = ip->ip_hl << 2;
     483    if (next + hlen > IP_MAXPACKET)
    483484    {
    484485        ipstat.ips_fragdropped += fp->ipq_nfrags;
     
    499500        m_cat(pData, m, q);
    500501
    501         m->m_len += (ip->ip_hl << 2);
    502         m->m_data -= (ip->ip_hl << 2);
     502        m->m_len += hlen;
     503        m->m_data -= hlen;
    503504        ip = mtod(m, struct ip *); /*update ip pointer */
    504     }
     505        hlen = ip->ip_hl << 2;
     506        m->m_len -= hlen;
     507        m->m_data += hlen;
     508    }
     509    m->m_len += hlen;
     510    m->m_data -= hlen;
    505511
    506512    /*
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