VirtualBox

Changeset 23155 in vbox


Ignore:
Timestamp:
09/19/2009 11:40:34 AM (8 years ago)
Author:
vboxsync
Message:

NAT: alias_dns doesn't require dtom any more, update of
corresponded mbufs happens on LibAliasIn exits

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

Legend:

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

    r23154 r23155  
    112112        STAM_PROFILE_STOP(&pData->StatALIAS_input, a); 
    113113        Log2(("NAT: LibAlias return %d\n", rc)); 
     114        if (m->m_len != ntohs(ip->ip_len)) 
     115        { 
     116            m->m_len = ntohs(ip->ip_len); 
     117        } 
    114118    } 
    115119 
  • trunk/src/VBox/Devices/Network/slirp/libalias/alias_dns.c

    r23154 r23155  
    7373    else 
    7474    { 
    75         /*!!! We need to be sure that */ 
    76         struct mbuf *m = NULL; 
    7775        char *query; 
    7876        char *answers; 
     
    8381        uint16_t addr_off = (uint16_t)~0; 
    8482         
    85 #ifndef VBOX_WITH_SLIRP_BSD_MBUF 
    86         m = dtom(la->pData, hdr);  
    87 #else 
    88         AssertMsgFailed(("Unimplemented")); 
    89 #endif 
    90         Assert((m)); 
    91          
    9283#if 0 
    9384        /*here is no compressed names+answers + new query*/ 
     
    9687        packet_len = (pip->ip_hl << 2) + sizeof(struct udphdr) + sizeof(union dnsmsg_header)  
    9788            + strlen(qname) +  2 * sizeof(uint16_t); /* ip + udp + header + query */ 
    98         fprintf(stderr,"got %d addresses for target:%s (m_len: %d)\n", h->h_length, h->h_name, m->m_len); 
    9989        query = (char *)&hdr[1]; 
    10090 
     
    156146        HTONS(hdr->X.ancount); 
    157147        /*don't forget update m_len*/ 
    158         m->m_len = packet_len; 
    159         pip->ip_len = htons(m->m_len); 
     148        pip->ip_len = htons(packet_len); 
    160149    } 
    161150} 
Note: See TracChangeset for help on using the changeset viewer.

www.oracle.com
ContactPrivacy policyTerms of Use