From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next] ip6_tunnel: collect_md xmit: Use ip_tunnel_key's provided src address Date: Tue, 07 Aug 2018 12:37:19 -0700 (PDT) Message-ID: <20180807.123719.1020396637013549448.davem@davemloft.net> References: <20180806120059.24992-1-shmulik.ladkani@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: ast@kernel.org, netdev@vger.kernel.org, shmulik.ladkani@gmail.com To: shmulik@metanetworks.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:49246 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725881AbeHGVxO (ORCPT ); Tue, 7 Aug 2018 17:53:14 -0400 In-Reply-To: <20180806120059.24992-1-shmulik.ladkani@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Shmulik Ladkani Date: Mon, 6 Aug 2018 15:00:59 +0300 > When using an ip6tnl device in collect_md mode, the xmit methods ignore > the ipv6.src field present in skb_tunnel_info's key, both for route > calculation purposes (flowi6 construction) and for assigning the > packet's final ipv6h->saddr. > > This makes it impossible specifying a desired ipv6 local address in the > encapsulating header (for example, when using tc action tunnel_key). > > This is also not aligned with behavior of ipip (ipv4) in collect_md > mode, where the key->u.ipv4.src gets used. > > Fix, by assigning fl6.saddr with given key->u.ipv6.src. > In case ipv6.src is not specified, ip6_tnl_xmit uses existing saddr > selection code. Applied, thanks. > Signed-off-by: Shmulik Ladkani > Reviewed-by: Eyal Birger > Fixes: 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6 tunnels") Please place the Fixes: tag first in the set of tags in the future, thank you.