VirtualBox

Changeset 23005 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Sep 14, 2009 2:07:40 PM (15 years ago)
Author:
vboxsync
Message:

NAT: update rigth IP header while reassembling.

File:
1 edited

Legend:

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

    r22984 r23005  
    203203        }
    204204        ip = mtod(m, struct ip *);
    205         hlen = ip->ip_len;
     205        hlen = ip->ip_hl << 2;
    206206    }
    207207    else
     
    490490        q->m_nextpkt = NULL;
    491491        m_cat(pData, m, q);
     492
     493        m->m_len += (ip->ip_hl << 2);
     494        m->m_data -= (ip->ip_hl << 2);
     495        ip = mtod(m, struct ip *); /*update ip pointer */
    492496    }
    493497
     
    497501     * Make header visible.
    498502     */
    499 #if 0
    500     ip->ip_len = (ip->ip_hl << 2) + next;
    501 #else
     503
    502504    ip->ip_len = next;
    503 #endif
    504505    ip->ip_src = fp->ipq_src;
    505506    ip->ip_dst = fp->ipq_dst;
     
    508509    RTMemFree(fp);
    509510
    510     m->m_len += (ip->ip_hl << 2);
    511     m->m_data -= (ip->ip_hl << 2);
     511    Assert((ip->ip_len == next));
    512512    /* some debugging cruft by sklower, below, will go away soon */
    513513#if 0
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