Commit 8b1b6fae authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Fixed bug related to parsing of ipv4 peer addresses

Thanks to Nikolai for spotting it
Fix by Robert Anderson <randerson@lbsd.net>
parent 7af68735
......@@ -384,7 +384,7 @@ sub policySourceItemMatches
# Match peer IPv4 or IPv6 (the server requesting the policy)
} elsif (
$item =~ /^\[(?:\d{1,3})(?:\.(?:\d{1,3})(?:\.(?:\d{1,3})(?:\.(?:\d{1,3}))?)?)?(?:\/(\d{1,2}))?\]$/ ||
$item =~ /^\[((?:\d{1,3})(?:\.(?:\d{1,3})(?:\.(?:\d{1,3})(?:\.(?:\d{1,3}))?)?)?(?:\/(\d{1,2}))?)\]$/ ||
$item =~ /^\[((?:::(:?[a-f\d]{1,4}:){0,7}?|(?::[a-f\d]{1,4}){0,7}?::|(?::[a-f\d]{1,4}){0,7}?::(?:[a-f\d]{1,4}:){0,7}?)(?:\/\d{1,3})?)\]$/i
) {
# We don't want the [ and ]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment