Changeset 91916 in vbox for trunk/src/VBox/NetworkServices/NAT
- Timestamp:
- Oct 21, 2021 12:26:53 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/NetworkServices/NAT/VBoxNetLwipNAT.cpp
r90078 r91916 609 609 } 610 610 611 if (iPrefixLength > 30 )612 { 613 reportError("I Pv4 prefix length %d is too narrow\n", iPrefixLength);611 if (iPrefixLength > 30 || 0 >= iPrefixLength) 612 { 613 reportError("Invalid IPv4 prefix length %d\n", iPrefixLength); 614 614 return VERR_INVALID_PARAMETER; 615 615 } … … 617 617 rc = RTNetPrefixToMaskIPv4(iPrefixLength, &Mask4); 618 618 AssertRCReturn(rc, rc); 619 AssertReturn(iPrefixLength > 0, VERR_INVALID_PARAMETER); 619 620 /** @todo r=uwe Check the address is unicast, not a loopback, etc. */ 620 621 621 622 RTNETADDRIPV4 Addr4;
Note:
See TracChangeset
for help on using the changeset viewer.