Fix the byte to positive int issue.
After masking the subnet, we convert it from int to byte and store it back to bytearray. Then in the matches() function, we convert the masked addr from int to byte again, which may be converted to a negative value due to overflow. Also adding a unit test to cover this case.
Showing
Please register or sign in to comment