mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-18 14:24:56 +00:00
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:
@@ -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"},
|
||||
|
||||
Reference in New Issue
Block a user