From mboxrd@z Thu Jan 1 00:00:00 1970 From: YOSHIFUJI Hideaki Subject: Re: [PATCH net v2 1/2] ipv6: enforce flowi6_oif usage in ip6_dst_lookup_tail() Date: Mon, 1 Feb 2016 11:24:05 +0900 Message-ID: <56AEC1C5.5000304@miraclelinux.com> References: <56AB5C2B.9030307@stressinduktion.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: hideaki.yoshifuji@miraclelinux.com, "David S. Miller" , David Ahern , Hajime Tazaki , lucien.xin@gmail.com, Marcelo Ricardo Leitner , YOSHIFUJI Hideaki To: Hannes Frederic Sowa , Paolo Abeni , netdev@vger.kernel.org Return-path: Received: from mail-pf0-f172.google.com ([209.85.192.172]:33777 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933533AbcBACYJ (ORCPT ); Sun, 31 Jan 2016 21:24:09 -0500 Received: by mail-pf0-f172.google.com with SMTP id x125so75062909pfb.0 for ; Sun, 31 Jan 2016 18:24:09 -0800 (PST) In-Reply-To: <56AB5C2B.9030307@stressinduktion.org> Sender: netdev-owner@vger.kernel.org List-ID: Hannes Frederic Sowa wrote: > On 29.01.2016 12:30, Paolo Abeni wrote: >> The current implementation of ip6_dst_lookup_tail basically >> ignore the egress ifindex match: if the saddr is set, >> ip6_route_output() purposefully ignores flowi6_oif, due >> to the commit d46a9d678e4c ("net: ipv6: Dont add RT6_LOOKUP_F_IFACE >> flag if saddr set"), if the saddr is 'any' the first route lookup >> in ip6_dst_lookup_tail fails, but upon failure a second lookup will >> be performed with saddr set, thus ignoring the ifindex constraint. >> >> This commit adds an output route lookup function variant, which >> allows the caller to specify lookup flags, and modify >> ip6_dst_lookup_tail() to enforce the ifindex match on the second >> lookup via said helper. >> >> ip6_route_output() becames now a static inline function build on >> top of ip6_route_output_flags(); as a side effect, out-of-tree >> modules need now a GPL license to access the output route lookup >> functionality. >> >> Signed-off-by: Paolo Abeni >> -- >> v1 -> v2 move the ip6_route_output() implementation into the header > > Acked-by: Hannes Frederic Sowa > Acked-by: YOSHIFUJI Hideaki -- Hideaki Yoshifuji Technical Division, MIRACLE LINUX CORPORATION