VirtualBox

Changeset 61805 in vbox


Ignore:
Timestamp:
Jun 21, 2016 4:37:09 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
108206
Message:

NAT: udp_listen - don't use a condition that is always false;
instead restore the original condition but ifdef the if/else out.
XXX: The comment that justified the original change looks bogus,
this needs to be revisited properly.

File:
1 edited

Legend:

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

    r61198 r61805  
    685685    /* XXX: wtf are we setting so_faddr/so_fport here? */
    686686    so->so_fport = addr.sin_port;
     687#if 0
    687688    /* The original check was completely broken, as the commented out
    688689     * if statement was always true (INADDR_ANY=0). */
    689     /* if (addr.sin_addr.s_addr == 0 || addr.sin_addr.s_addr == loopback_addr.s_addr) */
    690690    /* @todo: vvl - alias_addr should be set (if required)
    691691     * later by liabalias module.
    692692     */
    693     if (1 == 0)                 /* always use the else part */
     693    if (addr.sin_addr.s_addr == 0 || addr.sin_addr.s_addr == loopback_addr.s_addr)
    694694        so->so_faddr = alias_addr;
    695695    else
     696#endif
    696697        so->so_faddr = addr.sin_addr;
    697698
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