VirtualBox

Changeset 49432 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 8, 2013 6:44:09 PM (11 years ago)
Author:
vboxsync
Message:

NAT: prevent NAT thread from infinite loop on PowerOff if DNS server(s) not accessible.

File:
1 edited

Legend:

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

    r49347 r49432  
    158158#endif
    159159{
    160     struct proto_handler *b = NULL;
     160    struct proto_handler *b = NULL, *handler_chain_tail = NULL;
    161161
    162162    LIBALIAS_WLOCK_ASSERT();
     
    170170            return (0);
    171171        }
     172
     173        /* If the conditions above do not work, we should keep the last
     174         * element of the list in order to insert *p right after it. */
     175        handler_chain_tail = b;
    172176    }
    173177    /* End of list or found right position, inserts here. */
    174     if (b)
    175         LIST_INSERT_AFTER(b, p, entries);
     178    if (handler_chain_tail)
     179        LIST_INSERT_AFTER(handler_chain_tail, p, entries);
    176180    else
    177181        LIST_INSERT_HEAD(&handler_chain, p, entries);
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