Subject: [PATCH 33/46] rdma: silly ipv6 bugfix

From: Nigel Croxon <[email-masked]>
Date: Thu, 14 Nov 2013 22:53:09 +0100

RH-Author: Nigel Croxon <[email-masked]>
Message-id: <[email-masked]>
Patchwork-id: 55715
O-Subject: [RHEL7.0 PATCH 33/42] rdma: silly ipv6 bugfix
Bugzilla: 1011720
RH-Acked-by: Orit Wasserman <[email-masked]>
RH-Acked-by: Amit Shah <[email-masked]>
RH-Acked-by: Paolo Bonzini <[email-masked]>

Bugzilla: 1011720
https://bugzilla.redhat.com/show_bug.cgi?id=1011720

>From commit ID:
commit c89aa2f1851b08c3efa8a1070c0a6b9a36e1227f
Author: Michael R. Hines <[email-masked]>
Date:   Sun Aug 18 22:27:08 2013 -0400

    rdma: silly ipv6 bugfix

    My bad - but it's very important for us to warn the user that
    IPv6 is broken on RoCE in linux right now, until linux releases
    a fixed version.

    Signed-off-by: Michael R. Hines <[email-masked]>
    Signed-off-by: Michael Tokarev <[email-masked]>
---
 migration-rdma.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

Signed-off-by: Michal Novotny <[email-masked]>
---
 migration-rdma.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/migration-rdma.c b/migration-rdma.c
index ada488e..943496f 100644
--- a/migration-rdma.c
+++ b/migration-rdma.c
@@ -920,9 +920,11 @@ static int qemu_rdma_resolve_host(RDMAContext *rdma, Error **errp)
         ret = rdma_resolve_addr(rdma->cm_id, NULL, e->ai_dst_addr,
                 RDMA_RESOLVE_TIMEOUT_MS);
         if (!ret) {
-            ret = qemu_rdma_broken_ipv6_kernel(errp, rdma->cm_id->verbs);
-            if (ret) {
-                continue;
+            if (e->ai_family == AF_INET6) {
+                ret = qemu_rdma_broken_ipv6_kernel(errp, rdma->cm_id->verbs);
+                if (ret) {
+                    continue;
+                }
             }
             goto route;
         }
-- 
1.7.11.7