You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #58387 [Validator][CidrValidator] Fix error message for OutOfRangeNetmask validation (Fabdouarrahmane)
This PR was squashed before being merged into the 7.1 branch.
Discussion
----------
[Validator][CidrValidator] Fix error message for `OutOfRangeNetmask` validation
<table>
<tr>
<th>Q</th>
<th>A</th>
</tr>
<tr>
<td>Branch?</td>
<td>7.1</td>
</tr>
<tr>
<td>Bug fix?</td>
<td>yes</td>
</tr>
<tr>
<td>New feature?</td>
<td>no</td>
</tr>
<tr>
<td>Deprecations?</td>
<td>no</td>
</tr>
<tr>
<td>License</td>
<td>MIT</td>
</tr>
</table>
**Description**
This pull request addresses an issue with the error message generated for the OutOfRangeNetmask validation in the CidrValidator. The previous implementation allowed a maximum netmask of 128, which is incorrect for IPv4 addresses. The maximum should be set to 32 instead.
**Changes Made:**
- Updated the error message parameters in the CidrValidator to reflect the correct maximum netmask for IPv4.
- Modified the corresponding test to ensure that it accurately verifies the expected behavior.
**Benefits:**
This fix ensures that users receive accurate feedback when providing invalid CIDR notations, which enhances the overall reliability of the validation process.
**Testing:**
All existing tests have been run, and the new behavior has been verified. The tests confirm that the error message now correctly states the maximum allowed netmask for IPv4 addresses.
Feel free to adjust any part of it to better fit your style or add any additional information you think is relevant!
Commits
-------
bc0cabb7893 [Validator][CidrValidator] Fix error message for `OutOfRangeNetmask` validation
0 commit comments