VirtualBox

Changeset 65683 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
Feb 8, 2017 2:58:50 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
113385
Message:

ValidationKit: when getting the IP address of the system (for testing bridged networking with a predictable MAC address) blacklist hostnames starting with localhost

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testdriver/vboxwrappers.py

    r65458 r65683  
    15011501            try:
    15021502                sHostName = socket.getfqdn()
    1503                 if '.' not in sHostName:
     1503                if '.' not in sHostName and not sHostName.startswith('localhost'):
    15041504                    # somewhat misconfigured system, needs expensive approach to guessing FQDN
    15051505                    for aAI in socket.getaddrinfo(sHostName, None):
    15061506                        sName, _ = socket.getnameinfo(aAI[4], 0)
    1507                         if '.' in sName and not set(sName).issubset(set('0123456789.')):
     1507                        if '.' in sName and not set(sName).issubset(set('0123456789.')) and not sName.startswith('localhost'):
    15081508                            sHostName = sName
    15091509                            break
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