VirtualBox

Changeset 72278 in vbox for trunk/src


Ignore:
Timestamp:
May 21, 2018 9:33:21 PM (7 years ago)
Author:
vboxsync
Message:

NAT: udp_attach - gracefull handle getsockname() failure instead of
asserting that it's always successful.

File:
1 edited

Legend:

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

    r72276 r72278  
    554554
    555555    status = getsockname(so->s, &sa_addr, &socklen);
    556 #if 0 /** @todo  Something is explitived here! Temporarily disabled this annoying assertion.  Re-enable when fixed.  */
    557     Assert(status == 0 && sa_addr.sa_family == AF_INET);
    558 #endif
    559     so->so_hlport = ((struct sockaddr_in *)&sa_addr)->sin_port;
    560     so->so_hladdr.s_addr = ((struct sockaddr_in *)&sa_addr)->sin_addr.s_addr;
     556    if (status == 0)
     557    {
     558        Assert(sa_addr.sa_family == AF_INET);
     559        so->so_hlport = ((struct sockaddr_in *)&sa_addr)->sin_port;
     560        so->so_hladdr.s_addr = ((struct sockaddr_in *)&sa_addr)->sin_addr.s_addr;
     561    }
    561562
    562563    SOCKET_LOCK_CREATE(so);
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