VirtualBox

Ignore:
Timestamp:
Dec 5, 2014 9:12:22 AM (10 years ago)
Author:
vboxsync
Message:

NAT: trac ticket 13630 - use generation numbers as poor man's weak
references to prevent dnsproxy from using stale request::dns_server.

This commit has some extra LogRel() for the user to confirm the fix,
which are to be changed to Log2.

XXX: TOO: Clean up in dnsproxy_query() needs more investigation.
Existing code just punts with an "XXX" comment on sendto() failure,
which doesn't doesn't look right.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/dnsproxy/dnsproxy.h

    r26495 r53448  
    8282     * it's value on next server. And dnsproxy_query should
    8383     * initializate with first server in the list
     84     *
     85     * dnsgen is a generation number - a copy of pData->dnsgen at the
     86     * time of request creation (poor man's weak reference).
     87     * dns_server must not be used if pData->dnsgen changed.
    8488     */
    8589    struct dns_entry    *dns_server;
     90    uint32_t            dnsgen;
    8691    int nbyte; /* length of dns request */
    8792    char byte[1]; /* copy of original request */
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