- case OVS_KEY_ATTR_IPV6: {
- char src_str[INET6_ADDRSTRLEN];
- char dst_str[INET6_ADDRSTRLEN];
-
- ipv6_key = nl_attr_get(a);
- inet_ntop(AF_INET6, ipv6_key->ipv6_src, src_str, sizeof src_str);
- inet_ntop(AF_INET6, ipv6_key->ipv6_dst, dst_str, sizeof dst_str);
-
- ds_put_format(ds, "(src=%s,dst=%s,label=%#"PRIx32",proto=%"PRIu8
- ",tclass=%#"PRIx8",hlimit=%"PRIu8",frag=%s)",
- src_str, dst_str, ntohl(ipv6_key->ipv6_label),
- ipv6_key->ipv6_proto, ipv6_key->ipv6_tclass,
- ipv6_key->ipv6_hlimit,
- ovs_frag_type_to_string(ipv6_key->ipv6_frag));
+ case OVS_KEY_ATTR_IPV6:
+ if (!is_exact) {
+ const struct ovs_key_ipv6 *ipv6_key, *ipv6_mask;
+ char src_str[INET6_ADDRSTRLEN];
+ char dst_str[INET6_ADDRSTRLEN];
+ char src_mask[INET6_ADDRSTRLEN];
+ char dst_mask[INET6_ADDRSTRLEN];
+
+ ipv6_key = nl_attr_get(a);
+ inet_ntop(AF_INET6, ipv6_key->ipv6_src, src_str, sizeof src_str);
+ inet_ntop(AF_INET6, ipv6_key->ipv6_dst, dst_str, sizeof dst_str);
+
+ ipv6_mask = nl_attr_get(ma);
+ inet_ntop(AF_INET6, ipv6_mask->ipv6_src, src_mask, sizeof src_mask);
+ inet_ntop(AF_INET6, ipv6_mask->ipv6_dst, dst_mask, sizeof dst_mask);
+
+ ds_put_format(ds, "src=%s/%s,dst=%s/%s,label=%#"PRIx32"/%#"PRIx32
+ ",proto=%"PRIu8"/%#"PRIx8",tclass=%#"PRIx8"/%#"PRIx8
+ ",hlimit=%"PRIu8"/%#"PRIx8",frag=%s/%#"PRIx8,
+ src_str, src_mask, dst_str, dst_mask,
+ ntohl(ipv6_key->ipv6_label),
+ ntohl(ipv6_mask->ipv6_label),
+ ipv6_key->ipv6_proto, ipv6_mask->ipv6_proto,
+ ipv6_key->ipv6_tclass, ipv6_mask->ipv6_tclass,
+ ipv6_key->ipv6_hlimit, ipv6_mask->ipv6_hlimit,
+ ovs_frag_type_to_string(ipv6_key->ipv6_frag),
+ ipv6_mask->ipv6_frag);
+ } else {
+ const struct ovs_key_ipv6 *ipv6_key;
+ char src_str[INET6_ADDRSTRLEN];
+ char dst_str[INET6_ADDRSTRLEN];
+
+ ipv6_key = nl_attr_get(a);
+ inet_ntop(AF_INET6, ipv6_key->ipv6_src, src_str, sizeof src_str);
+ inet_ntop(AF_INET6, ipv6_key->ipv6_dst, dst_str, sizeof dst_str);
+
+ ds_put_format(ds, "src=%s,dst=%s,label=%#"PRIx32",proto=%"PRIu8
+ ",tclass=%#"PRIx8",hlimit=%"PRIu8",frag=%s",
+ src_str, dst_str, ntohl(ipv6_key->ipv6_label),
+ ipv6_key->ipv6_proto, ipv6_key->ipv6_tclass,
+ ipv6_key->ipv6_hlimit,
+ ovs_frag_type_to_string(ipv6_key->ipv6_frag));
+ }