Add network condition for matching IP network ranges #10743
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
network
condition checks if the field is in a certain IP network range.Both IPv4 and IPv6 addresses are supported. The network range may be specified
using CIDR notation, like "192.0.2.0/24" or "2001:db8::/32", or by using one of
these named ranges:
loopback
- Matches loopback addresses in the range of127.0.0.0/8
or::1/128
.unicast
- Matches global unicast addresses defined in RFC 1122, RFC 4632,and RFC 4291 with the exception of the IPv4 broadcast address
(
255.255.255.255
). This includes private address ranges.multicast
- Matches multicast addresses.interface_local_multicast
- Matches IPv6 interface-local multicast addresses.link_local_unicast
- Matches link-local unicast addresses.link_local_multicast
- Matches link-local multicast addresses.private
- Matches private address ranges defined in RFC 1918 (IPv4) andRFC 4193 (IPv6).
public
- Matches addresses that are not loopback, unspecified, IPv4broadcast, link local unicast, link local multicast, interface local
multicast, or private.
unspecified
- Matches unspecified addresses (either the IPv4 address"0.0.0.0" or the IPv6 address "::").
Example