diff mbox

[ovs-dev,v2,04/14] smap: smap_add_ipv6 adds IPv4-mapped addresses as IPv4

Message ID 1448458277-28154-5-git-send-email-cascardo@redhat.com
State Accepted
Headers show

Commit Message

Thadeu Lima de Souza Cascardo Nov. 25, 2015, 1:31 p.m. UTC
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
---
 lib/smap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ben Pfaff Nov. 30, 2015, 6:11 p.m. UTC | #1
On Wed, Nov 25, 2015 at 11:31:07AM -0200, Thadeu Lima de Souza Cascardo wrote:
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>

Applied, thanks!
diff mbox

Patch

diff --git a/lib/smap.c b/lib/smap.c
index 2c41013..07dd23a 100644
--- a/lib/smap.c
+++ b/lib/smap.c
@@ -19,6 +19,7 @@ 
 
 #include "hash.h"
 #include "json.h"
+#include "packets.h"
 #include "uuid.h"
 
 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)
 {
     char buf[INET6_ADDRSTRLEN];
-
-    inet_ntop(AF_INET6, addr, buf, sizeof buf);
+    ipv6_string_mapped(buf, addr);
     smap_add(smap, key, buf);
 }