VirtualBox

Changeset 72274 in vbox


Ignore:
Timestamp:
May 21, 2018 1:03:22 PM (7 years ago)
Author:
vboxsync
Message:

NAT: udp_attach - set so_type early.

File:
1 edited

Legend:

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

    r72239 r72274  
    531531    int opt = 1;
    532532
    533     /* We attaching some olready attched socket ??? */
    534     Assert(so->so_type == 0);
     533    AssertReturn(so->so_type == 0, -1);
     534    so->so_type = IPPROTO_UDP;
     535
    535536    if ((so->s = socket(AF_INET, SOCK_DGRAM, 0)) == -1)
    536537        goto error;
     
    561562    NSOCK_INC();
    562563    QSOCKET_UNLOCK(udb);
    563     so->so_type = IPPROTO_UDP;
    564564    return so->s;
    565565error:
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