[ovs-dev] [PATCH] ovs-router: use correct gw address at lookup output

Thadeu Lima de Souza Cascardo cascardo at redhat.com
Thu Nov 24 18:49:25 UTC 2016


After commit 0b8da9ae1f38, the output of the gateway was incorrectly changed to
that of the destination address.

Upstream has this corrected, but by a commit that introduces a lot of new
features as a8704b502785 ("tunneling: Handle multiple ip address for given
device.") Hence, this patch.

Fixes: 0b8da9ae1f38 ("route: support IPv6 and use IPv4-mapped addresses")
CC: Pravin B Shelar <pshelar at ovn.org>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo at redhat.com>
---
 lib/ovs-router.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/ovs-router.c b/lib/ovs-router.c
index 9a59a24..447b912 100644
--- a/lib/ovs-router.c
+++ b/lib/ovs-router.c
@@ -355,7 +355,7 @@ ovs_router_lookup_cmd(struct unixctl_conn *conn, int argc OVS_UNUSED,
     if (ovs_router_lookup(&ip6, iface, &gw)) {
         struct ds ds = DS_EMPTY_INITIALIZER;
         ds_put_format(&ds, "gateway ");
-        ipv6_format_mapped(&ip6, &ds);
+        ipv6_format_mapped(&gw, &ds);
         ds_put_format(&ds, "\ndev %s\n", iface);
         unixctl_command_reply(conn, ds_cstr(&ds));
         ds_destroy(&ds);
-- 
2.7.4



More information about the dev mailing list