VirtualBox

Changeset 49027 in vbox for trunk/src/VBox/NetworkServices


Ignore:
Timestamp:
Oct 10, 2013 12:05:52 PM (11 years ago)
Author:
vboxsync
Message:

portfwd.c: G/c:

  1. same order of assignments before WSAStringToAddressA in "source" and "destination" parts.
  2. Drops check of socket address family check after WSAStringToAddressA.
  3. Drops half-comment-link to remark to WSAEINVAL error code of WSAStringToAddressA.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/NetworkServices/NAT/portfwd.c

    r49024 r49027  
    223223    saf = (sdom == PF_INET) ? AF_INET : AF_INET6;
    224224
     225    fwspec->src.sa.sa_family = saf;
    225226    socklen = sizeof(fwspec->src);
    226     fwspec->src.sa.sa_family = saf; /* see "Remarks" WSAStringToAddress */
    227227    status = WSAStringToAddressA((char *)src_addr_str, saf, NULL,
    228228                                  &fwspec->src.sa, &socklen);
    229229    if (status == SOCKET_ERROR) {
    230         return -1;
    231     }
    232    
    233     if (fwspec->src.sa.sa_family != saf) {
    234230        return -1;
    235231    }
     
    240236                                &fwspec->dst.sa, &socklen);
    241237    if (status == SOCKET_ERROR) {
    242         return -1;
    243     }
    244     if (fwspec->dst.sa.sa_family != saf) {
    245238        return -1;
    246239    }
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