From patchwork Mon Apr 16 13:56:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Numan Siddique X-Patchwork-Id: 898637 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40Pqgm6lVZz9s1l for ; Mon, 16 Apr 2018 23:57:08 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 6C95EDD0; Mon, 16 Apr 2018 13:57:06 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 2C6B4DB6 for ; Mon, 16 Apr 2018 13:57:05 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 6B9A9473 for ; Mon, 16 Apr 2018 13:57:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 93EF28DC48 for ; Mon, 16 Apr 2018 13:57:03 +0000 (UTC) Received: from numans.blr.redhat.com (ovpn-116-236.sin2.redhat.com [10.67.116.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB03A215CDC8; Mon, 16 Apr 2018 13:57:01 +0000 (UTC) From: nusiddiq@redhat.com To: dev@openvswitch.org Date: Mon, 16 Apr 2018 19:26:53 +0530 Message-Id: <20180416135653.14805-1-nusiddiq@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Mon, 16 Apr 2018 13:57:03 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Mon, 16 Apr 2018 13:57:03 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'nusiddiq@redhat.com' RCPT:'' X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH] ovn IPv6 periodic RA : Set Router Lifetime value X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org From: Numan Siddique ovn-controller when it sends out periodic RA packets, sets '0' in the Router lifetime field. As per the RFC 4861, lifetime of 0 indicates that the router is not a default router and SHOULD NOT appear on the default router list. Without the default route, a VM will not able to reach to other router ports attached to the same router unless a default route is added by the user. ovn-controller when encoding the 'put_nd_ra_opts' action sets the Router Lifetime field to 0xffff. So this patch also sets the same value when sending out the periodic RAs. Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1567735 CC: Mark Michelson Signed-off-by: Numan Siddique Reviewed-by: Jakub Sitnicki Acked-by: Mark Michelson --- ovn/controller/pinctrl.c | 3 ++- tests/ovn.at | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ovn/controller/pinctrl.c b/ovn/controller/pinctrl.c index 2f130994a..6e6aa1caa 100644 --- a/ovn/controller/pinctrl.c +++ b/ovn/controller/pinctrl.c @@ -1432,7 +1432,8 @@ ipv6_ra_send(struct ipv6_ra_state *ra) dp_packet_use_stub(&packet, packet_stub, sizeof packet_stub); compose_nd_ra(&packet, ra->config->eth_src, ra->config->eth_dst, &ra->config->ipv6_src, &ra->config->ipv6_dst, - 255, ra->config->mo_flags, 0, 0, 0, ra->config->mtu); + 255, ra->config->mo_flags, htons(IPV6_ND_RA_LIFETIME), 0, 0, + ra->config->mtu); for (int i = 0; i < ra->config->prefixes.n_ipv6_addrs; i++) { ovs_be128 addr; diff --git a/tests/ovn.at b/tests/ovn.at index 7ae6640dc..e6c9db60d 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -9377,7 +9377,7 @@ construct_expected_ra() { shift 2 done - local ra=ff${ra_mo}00000000000000000000${slla}${mtu_opt}${prefix} + local ra=ff${ra_mo}ffff0000000000000000${slla}${mtu_opt}${prefix} local icmp=8600XXXX${ra} local ip_len=$(expr ${#icmp} / 2)