VirtualBox

Changeset 40283 in vbox


Ignore:
Timestamp:
Feb 29, 2012 2:21:42 AM (13 years ago)
Author:
vboxsync
Message:

NAT: CTL_CHECK takes address without modification.

Location:
trunk/src/VBox/Devices/Network/slirp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/ctl.h

    r40279 r40283  
    2525#define CTL_BROADCAST   255
    2626
    27 #define CTL_CHECK(x, ctl) (((x) & ~pData->netmask) == (ctl) \
     27#define CTL_CHECK(x, ctl) ((RT_N2H_U32((x)) & ~pData->netmask) == (ctl) \
    2828                           && (((x) & ~pData->netmask) == (pData->special_addr.s_addr & ~pData->netmask)))
  • trunk/src/VBox/Devices/Network/slirp/udp.c

    r39894 r40283  
    182182    if (   pData->fUseHostResolver
    183183        && uh->uh_dport == RT_H2N_U16_C(53)
    184         && CTL_CHECK(RT_N2H_U32(ip->ip_dst.s_addr), CTL_DNS))
     184        && CTL_CHECK(ip->ip_dst.s_addr, CTL_DNS))
    185185    {
    186186        struct sockaddr_in dst, src;
     
    202202     */
    203203    if (   uh->uh_dport == RT_H2N_U16_C(TFTP_SERVER)
    204         && CTL_CHECK(RT_N2H_U32(ip->ip_dst.s_addr), CTL_TFTP))
     204        && CTL_CHECK(ip->ip_dst.s_addr, CTL_TFTP))
    205205    {
    206206        tftp_input(pData, m);
     
    413413            m->m_flags |= M_SKIP_FIREWALL;
    414414            /**
    415              * udp/137 port is used for NetBIOS lookup. for some reasons Windows guest rejects
     415             * udp/137 port is Name Service in NetBIOS protocol. for some reasons Windows guest rejects
    416416             * accept data from non-aliased server.
    417417             */
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