test: ipv4 in v6 address checking (#1271)
* test: ipv4 in v6 address checking * fix(lib/policy): unmap 4in6 addresses in RemoteAddrChecker Signed-off-by: Xe Iaso <me@xeiaso.net> * docs: update CHANGELOG Signed-off-by: Xe Iaso <me@xeiaso.net> * docs: perfect CHANGELOG Signed-off-by: Xe Iaso <me@xeiaso.net> --------- Signed-off-by: Xe Iaso <me@xeiaso.net> Co-authored-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
parent
1e298f5d0e
commit
a5bb6d2751
3 changed files with 22 additions and 2 deletions
|
|
@ -21,6 +21,20 @@ func TestRemoteAddrChecker(t *testing.T) {
|
|||
ok: true,
|
||||
err: nil,
|
||||
},
|
||||
{
|
||||
name: "match_ipv4_in_ipv6",
|
||||
cidrs: []string{"0.0.0.0/0"},
|
||||
ip: "::ffff:1.1.1.1",
|
||||
ok: true,
|
||||
err: nil,
|
||||
},
|
||||
{
|
||||
name: "match_ipv4_in_ipv6_hex",
|
||||
cidrs: []string{"0.0.0.0/0"},
|
||||
ip: "::ffff:101:101",
|
||||
ok: true,
|
||||
err: nil,
|
||||
},
|
||||
{
|
||||
name: "match_ipv6",
|
||||
cidrs: []string{"::/0"},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue