VirtualBox

Changeset 23202 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Sep 22, 2009 5:31:44 AM (15 years ago)
Author:
vboxsync
Message:

NAT: don't hide bugs with extra sizes.

Location:
trunk/src/VBox/Devices/Network/slirp
Files:
2 edited

Legend:

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

    r23178 r23202  
    309309            mhip = mtod(m, struct ip *);
    310310            *mhip = *ip;
     311            m->m_len += ip->ip_hl << 2;
    311312#ifdef VBOX_WITH_SLIRP_BSD_MBUF
    312313            m->m_pkthdr.header = mtod(m, void *);
     
    343344            m->m_len += mhlen;
    344345            RTMemFree(buf);
    345             m->m_len = ntohs(mhip->ip_len);
     346            m->m_len += ntohs(mhip->ip_len);
    346347#endif
    347348
  • trunk/src/VBox/Devices/Network/slirp/mbuf.c

    r22428 r23202  
    3333    /*
    3434     * Find a nice value for msize
    35      * XXX if_maxlinkhdr already in mtu
    3635     */
    3736    msize = (if_mtu>if_mru ? if_mtu : if_mru)
    38           + if_maxlinkhdr + sizeof(struct m_hdr ) + 6;
     37          + sizeof(struct m_hdr );
    3938}
    4039
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