VirtualBox

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


Ignore:
Timestamp:
Jan 17, 2012 4:13:45 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
75719
Message:

NAT: backed out r75718.

File:
1 edited

Legend:

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

    r39773 r39774  
    3030#define DNS_CONTROL_PORT_NUMBER 53
    3131/* see RFC 1035(4.1.1) */
    32 #pragma pack(1)
    3332union dnsmsg_header
    3433{
    3534    struct
    3635    {
    37         uint16_t id;
     36        unsigned id:16;
    3837        unsigned rd:1;
    3938        unsigned tc:1;
     
    4948        uint16_t arcount;
    5049    } X;
    51     uint16_t raw[5];
     50    uint16_t raw[6];
    5251};
    53 #pragma pack()
    5452AssertCompileSize(union dnsmsg_header, 12);
    5553
     
    10199{
    102100    int i;
    103     LogFlowFunc(("ENTER: pszQname:%s\n", pszQname));
    104     pHdr->X.qr = 1; /* response */
     101
    105102    if (!pHostent)
    106103    {
     104        pHdr->X.qr = 1; /* response */
    107105        pHdr->X.aa = 1;
    108106        pHdr->X.rd = 1;
     
    191189        pIp->ip_len = htons(packet_len);
    192190    }
    193     LogFlowFuncLeave();
    194191}
    195192
     
    207204    struct udphdr *udp = NULL;
    208205    union dnsmsg_header *pHdr = NULL;
    209     LogFlowFuncEnter();
    210206    NOREF(la);
    211207    NOREF(ah);
     
    214210
    215211    if (pHdr->X.qr == 1)
    216     {
    217         LogFlowFunc(("pHdr(X.qr:%d, raw:%RX16)\n", pHdr->X.qr, pHdr->raw));
    218         LogFlowFuncLeave();
    219212        return 0; /* this is respose */
    220     }
    221213
    222214    memset(pszCname, 0, sizeof(pszCname));
     
    231223            fMultiWarn = true;
    232224        }
    233         LogFlowFuncLeave();
    234225        return 1;
    235226    }
     
    272263    pIp->ip_sum = 0;
    273264    pIp->ip_sum = LibAliasInternetChecksum(la, (uint16_t *)pIp, pIp->ip_hl << 2);
    274     LogFlowFuncLeave();
    275265    return 0;
    276266}
     
    404394            if (!strcmp(pDNSMapingEntry->pszCName, *pszAlias))
    405395            {
    406                 /*
    407                  * we need add mappings for real host name, instead of using alias.
    408                  * DNS server doesn't return alias list on real name request.
    409                  */
     396
    410397                PDNSMAPPINGENTRY pDnsMapping = RTMemAllocZ(sizeof(DNSMAPPINGENTRY));
    411398                fMatch = true;
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