mirror of
https://github.com/openvswitch/ovs
synced 2025-08-30 22:05:19 +00:00
smap: smap_add_ipv6 adds IPv4-mapped addresses as IPv4
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
committed by
Ben Pfaff
parent
bed610e87a
commit
719a3d2553
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "hash.h"
|
#include "hash.h"
|
||||||
#include "json.h"
|
#include "json.h"
|
||||||
|
#include "packets.h"
|
||||||
#include "uuid.h"
|
#include "uuid.h"
|
||||||
|
|
||||||
static struct smap_node *smap_add__(struct smap *, char *, void *,
|
static struct smap_node *smap_add__(struct smap *, char *, void *,
|
||||||
@@ -101,8 +102,7 @@ void
|
|||||||
smap_add_ipv6(struct smap *smap, const char *key, struct in6_addr *addr)
|
smap_add_ipv6(struct smap *smap, const char *key, struct in6_addr *addr)
|
||||||
{
|
{
|
||||||
char buf[INET6_ADDRSTRLEN];
|
char buf[INET6_ADDRSTRLEN];
|
||||||
|
ipv6_string_mapped(buf, addr);
|
||||||
inet_ntop(AF_INET6, addr, buf, sizeof buf);
|
|
||||||
smap_add(smap, key, buf);
|
smap_add(smap, key, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user