From patchwork Fri Jul 29 06:26:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Pettit X-Patchwork-Id: 653998 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3s0zKx1dh8z9t0G for ; Fri, 29 Jul 2016 16:27:33 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 8A9BA114C9; Thu, 28 Jul 2016 23:26:48 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e3.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 92C3E114A6 for ; Thu, 28 Jul 2016 23:26:43 -0700 (PDT) Received: from bar5.cudamail.com (localhost [127.0.0.1]) by mx1e3.cudamail.com (Postfix) with ESMTPS id 2DF984201CB for ; Fri, 29 Jul 2016 00:26:43 -0600 (MDT) X-ASG-Debug-ID: 1469773602-09eadd7ae838ea80001-byXFYA Received: from mx3-pf1.cudamail.com ([192.168.14.2]) by bar5.cudamail.com with ESMTP id 2XkesFmmyM330vNu (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 29 Jul 2016 00:26:42 -0600 (MDT) X-Barracuda-Envelope-From: jpettit@ovn.org X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.2 Received: from unknown (HELO relay5-d.mail.gandi.net) (217.70.183.197) by mx3-pf1.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 29 Jul 2016 06:26:42 -0000 Received-SPF: pass (mx3-pf1.cudamail.com: SPF record at ovn.org designates 217.70.183.197 as permitted sender) X-Barracuda-Apparent-Source-IP: 217.70.183.197 X-Barracuda-RBL-IP: 217.70.183.197 Received: from mfilter45-d.gandi.net (mfilter45-d.gandi.net [217.70.178.176]) by relay5-d.mail.gandi.net (Postfix) with ESMTP id 1A90B41C08A for ; Fri, 29 Jul 2016 08:26:41 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter45-d.gandi.net Received: from relay5-d.mail.gandi.net ([IPv6:::ffff:217.70.183.197]) by mfilter45-d.gandi.net (mfilter45-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id UfVa0ZccNI-F for ; Fri, 29 Jul 2016 08:26:39 +0200 (CEST) X-Originating-IP: 108.70.244.32 Received: from raznick.localdomain (unknown [108.70.244.32]) (Authenticated sender: jpettit@ovn.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 2EBD641C08D for ; Fri, 29 Jul 2016 08:26:38 +0200 (CEST) X-CudaMail-Envelope-Sender: jpettit@ovn.org From: Justin Pettit To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-V1-728000264 X-CudaMail-DTE: 072916 X-CudaMail-Originating-IP: 217.70.183.197 Date: Thu, 28 Jul 2016 23:26:19 -0700 X-ASG-Orig-Subj: [##CM-V1-728000264##][IPv6 v2 09/10] ovn: Add support for link-local addresses. Message-Id: <1469773580-33112-9-git-send-email-jpettit@ovn.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1469773580-33112-1-git-send-email-jpettit@ovn.org> References: <1469773580-33112-1-git-send-email-jpettit@ovn.org> X-Barracuda-Connect: UNKNOWN[192.168.14.2] X-Barracuda-Start-Time: 1469773602 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [IPv6 v2 09/10] ovn: Add support for link-local addresses. X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Every IPv6-enabled interface is supposed to have a link-local address available to it. This commit adds a link local interface to each router port and scopes link-local routes to the ingress port that received the packet. Signed-off-by: Justin Pettit Acked-by: Ben Pfaff --- ovn/lib/ovn-util.c | 11 +++++++++-- ovn/northd/ovn-northd.8.xml | 5 +++++ ovn/northd/ovn-northd.c | 15 ++++++++++----- ovn/ovn-nb.xml | 6 ++++++ 4 files changed, 30 insertions(+), 7 deletions(-) diff --git a/ovn/lib/ovn-util.c b/ovn/lib/ovn-util.c index 51e3026..f90670e 100644 --- a/ovn/lib/ovn-util.c +++ b/ovn/lib/ovn-util.c @@ -122,9 +122,11 @@ extract_lsp_addresses(char *address, struct lport_addresses *laddrs) /* Extracts the mac, IPv4 and IPv6 addresses from the * "nbrec_logical_router_port" parameter 'lrp'. Stores the IPv4 and * IPv6 addresses in the 'ipv4_addrs' and 'ipv6_addrs' fields of - * 'laddrs', respectively. + * 'laddrs', respectively. In addition, a link local IPv6 address + * based on the 'mac' member of 'lrp' is added to the 'ipv6_addrs' + * field. * - * Return true if at least 'MAC' is found in 'lrp', false otherwise. + * Return true if a valid 'mac' address is found in 'lrp', false otherwise. * * The caller must call destroy_lport_addresses(). */ bool @@ -175,6 +177,11 @@ extract_lrp_networks(const struct nbrec_logical_router_port *lrp, } } + /* Always add the IPv6 link local address. */ + struct in6_addr lla; + in6_generate_lla(laddrs->ea, &lla); + add_ipv6_netaddr(laddrs, lla, 64); + return true; } diff --git a/ovn/northd/ovn-northd.8.xml b/ovn/northd/ovn-northd.8.xml index 790ca7e..bfcaeb5 100644 --- a/ovn/northd/ovn-northd.8.xml +++ b/ovn/northd/ovn-northd.8.xml @@ -1131,6 +1131,11 @@ next; Instead, if the route is from a configured static route, G is the next hop IP address. Else it is ip6.dst.

+ +

+ If the address A is in the link-local scope, the + route will be limited to sending on the ingress port. +