mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
nicira-ext: Support matching IPv6 traffic.
Provides ability to match over IPv6 traffic in the same manner as IPv4. Currently, the matching fields include: - IPv6 source and destination addresses (ipv6_src and ipv6_dst) - Traffic Class (nw_tos) - Next Header (nw_proto) - ICMPv6 Type and Code (icmp_type and icmp_code) - TCP and UDP Ports over IPv6 (tp_src and tp_dst) When defining IPv6 rules, the Nicira Extensible Match (NXM) extension to OVS must be used. Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
@@ -121,6 +121,20 @@ lookup_ip(const char *host_name, struct in_addr *addr)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Translates 'host_name', which must be a string representation of an IPv6
|
||||
* address, into a numeric IPv6 address in '*addr'. Returns 0 if successful,
|
||||
* otherwise a positive errno value. */
|
||||
int
|
||||
lookup_ipv6(const char *host_name, struct in6_addr *addr)
|
||||
{
|
||||
if (inet_pton(AF_INET6, host_name, addr) != 1) {
|
||||
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
|
||||
VLOG_ERR_RL(&rl, "\"%s\" is not a valid IPv6 address", host_name);
|
||||
return ENOENT;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Returns the error condition associated with socket 'fd' and resets the
|
||||
* socket's error status. */
|
||||
int
|
||||
|
Reference in New Issue
Block a user