VirtualBox

Ignore:
Timestamp:
Jul 8, 2009 10:00:30 AM (16 years ago)
Author:
vboxsync
Message:

NAT: incorrect m_adj usage

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

Legend:

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

    r20961 r21385  
    529529    {
    530530        int new_m_size;
    531         m_adj(m, if_maxlinkhdr);
     531        m->m_data += if_maxlinkhdr;
    532532        new_m_size = sizeof(struct ip) + ICMP_MINLEN + msrc->m_len + ICMP_MAXDATALEN;
    533533        if (new_m_size>m->m_size)
  • trunk/src/VBox/Devices/Network/slirp/ip_output.c

    r20164 r21385  
    201201                goto sendorfree;
    202202            }
    203             m_adj(m, if_maxlinkhdr);
     203            m->m_data += if_maxlinkhdr;
    204204            mhip = mtod(m, struct ip *);
    205205            *mhip = *ip;
  • trunk/src/VBox/Devices/Network/slirp/mbuf.c

    r20164 r21385  
    188188m_adj(struct mbuf *m, int len)
    189189{
     190    int mlen = m->m_len;
    190191    if (m == NULL)
    191192        return;
     
    202203        m->m_len -= len;
    203204    }
     205    Assert(m->m_len > 0);
    204206}
    205207
  • trunk/src/VBox/Devices/Network/slirp/socket.c

    r21049 r21385  
    576576        }
    577577        /* adjust both parameters to maks M_FREEROOM calculate correct */
    578         m_adj(m, if_maxlinkhdr + sizeof(struct udphdr) + sizeof(struct ip));
     578        m->m_data += if_maxlinkhdr + sizeof(struct udphdr) + sizeof(struct ip);
    579579
    580580        /*
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