Merge pull request #2386 from AlexanderS/ds4200

[DS-4200] IPMatcher: Fix netmask conversion
This commit is contained in:
Tim Donohue
2020-07-17 09:40:29 -05:00
committed by GitHub
2 changed files with 18 additions and 7 deletions

View File

@@ -153,6 +153,14 @@ public class IPMatcherTest {
assertFalse(ipMatcher.match("0:0:0:0:0:0:0:1"));
}
@Test
public void testIPv6FullMaskMatching() throws Exception {
final IPMatcher ipMatcher = new IPMatcher("::2/128");
assertTrue(ipMatcher.match("0:0:0:0:0:0:0:2"));
assertFalse(ipMatcher.match("0:0:0:0:0:0:0:1"));
}
@Test
public void testAsteriskMatchingSuccess() throws Exception {