VirtualBox

Changeset 39884 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Jan 26, 2012 9:08:48 AM (13 years ago)
Author:
vboxsync
Message:

NAT:TCP:tcp_output uninitiolized template detection and warning once at release log.

File:
1 edited

Legend:

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

    r39848 r39884  
    448448    else
    449449    {
     450        bool fUninitiolizedTemplate = false;
    450451        if (tp->t_flags & TF_ACKNOW)
    451452            tcpstat.tcps_sndacks++;
     
    487488        m->m_pkthdr.header = mtod(m, void *);
    488489        m->m_len = hdrlen;
    489         /* fill template from socket structure */
    490         tcp_template(tp);
     490        /*
     491         * Uninitialized TCP template looks very suspicious at this processing state, thus why we have
     492         * to workaround the problem till right fix. Warning appears once at release log.
     493         */
     494        fUninitiolizedTemplate = RT_BOOL((   tp->t_template.ti_src.s_addr == INADDR_ANY
     495                                          || tp->t_template.ti_dst.s_addr == INADDR_ANY));
     496#ifndef DEBUG_vvl
     497        if (fUninitiolizedTemplate)
     498        {
     499            static bool fWarn;
     500            tcp_template(tp);
     501            if(!fWarn)
     502            {
     503                LogRel(("NAT:TCP: TCP template was created forcely from socket information\n"));
     504                fWarn = true;
     505            }
     506        }
     507#else
     508        Assert((!fUninitiolizedTemplate));
     509#endif
    491510    }
    492511
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