mcast-snooping: Use IPv6 address for MDB
[cascardo/ovs.git] / lib / packets.c
index d04fffc..d0ad0b6 100644 (file)
@@ -437,6 +437,17 @@ print_ipv6_addr(struct ds *string, const struct in6_addr *addr)
     string->length += strlen(dst);
 }
 
+void
+print_ipv6_mapped(struct ds *s, const struct in6_addr *addr)
+{
+    if (IN6_IS_ADDR_V4MAPPED(addr)) {
+        ds_put_format(s, IP_FMT, addr->s6_addr[12], addr->s6_addr[13],
+                                 addr->s6_addr[14], addr->s6_addr[15]);
+    } else {
+        print_ipv6_addr(s, addr);
+    }
+}
+
 void
 print_ipv6_masked(struct ds *s, const struct in6_addr *addr,
                   const struct in6_addr *mask)