VirtualBox

Changeset 90078 in vbox for trunk/src


Ignore:
Timestamp:
Jul 7, 2021 4:31:06 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
145575
Message:

NAT/Net: VBoxNetLwipNAT::processFrame - drop the assert part of
AssertReturn checks. These are not part of the intnet contract,
so convert them to plain ifs. bugref:9929.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/NetworkServices/NAT/VBoxNetLwipNAT.cpp

    r88308 r90078  
    18751875{
    18761876    AssertReturnVoid(pvFrame != NULL);
    1877     AssertReturnVoid(cbFrame != 0);
    1878     AssertReturnVoid(cbFrame <= 1522); /* include .1Q and FCS */
     1877
     1878    /* shouldn't happen, but if it does, don't even bother */
     1879    if (RT_UNLIKELY(cbFrame < sizeof(RTNETETHERHDR)))
     1880        return;
     1881
     1882    /* we expect normal ethernet frame including .1Q and FCS */
     1883    if (cbFrame > 1522)
     1884        return;
    18791885
    18801886    AssertReturnVoid(pvUser != NULL);
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