VirtualBox

Ignore:
Timestamp:
Apr 19, 2010 8:20:52 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
60216
Message:

NAT: udp.c assertion is corrected and similar check added into tcp_input routine.

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

Legend:

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

    r28443 r28445  
    344344     */
    345345    ip = mtod(m, struct ip *);
     346    /*
     347     * (vvl) ip_input substracts IP header length from ip->ip_len value.
     348     * here we do the test the same as input method of UDP protocol.
     349     */
     350#ifdef VBOX_WITH_SLIRP_BSD_MBUF
     351    Assert((ip->ip_len + iphlen == m_length(m, NULL)));
     352#else
     353    Assert((ip->ip_len  + iphlen == m->m_len));
     354#endif
    346355    save_ip = *ip;
    347356    save_ip.ip_len+= iphlen;
  • trunk/src/VBox/Devices/Network/slirp/udp.c

    r28443 r28445  
    108108    len = RT_N2H_U16((u_int16_t)uh->uh_ulen);
    109109    Assert((ip->ip_len == len));
     110#ifndef VBOX_WITH_SLIRP_BSD_MBUF
    110111    Assert((ip->ip_len + iphlen == m->m_len));
     112#else
     113    Assert((ip->ip_len + iphlen == m_length(m, NULL)));
     114#endif
    111115
    112116    if (ip->ip_len != len)
Note: See TracChangeset for help on using the changeset viewer.

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