From patchwork Fri May 28 18:17:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Haley X-Patchwork-Id: 53945 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 2DC97B6EFF for ; Sat, 29 May 2010 04:17:53 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753525Ab0E1SRt (ORCPT ); Fri, 28 May 2010 14:17:49 -0400 Received: from g5t0009.atlanta.hp.com ([15.192.0.46]:37959 "EHLO g5t0009.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752784Ab0E1SRs (ORCPT ); Fri, 28 May 2010 14:17:48 -0400 Received: from g5t0030.atlanta.hp.com (g5t0030.atlanta.hp.com [16.228.8.142]) by g5t0009.atlanta.hp.com (Postfix) with ESMTP id 1F0293008D; Fri, 28 May 2010 18:17:47 +0000 (UTC) Received: from [16.1.1.102] (squirrel.fc.hp.com [15.11.146.57]) by g5t0030.atlanta.hp.com (Postfix) with ESMTP id 0AFE51405D; Fri, 28 May 2010 18:17:44 +0000 (UTC) Message-ID: <4C0008C7.7020302@hp.com> Date: Fri, 28 May 2010 14:17:43 -0400 From: Brian Haley Organization: Open Source and Linux Organization User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100423 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 To: David Miller CC: Arnaud Ebalard , Scott C Otto , =?UTF-8?B?WU9TSElGVUpJIEhpZGVha2kgLyDlkInol6Toi7HmmI4=?= , Jiri Olsa , netdev@vger.kernel.org Subject: [PATCH] IPv6: fix Mobile IPv6 regression References: <87zkzmppfg.fsf@small.ssi.corp> <4BFDC14F.6050407@hp.com> <8739xdqsuz.fsf@small.ssi.corp> <4BFECA65.7030102@hp.com> <4BFEE49C.8060301@lucent.com> <87hblss92x.fsf@small.ssi.corp> <4C00047D.3010404@hp.com> In-Reply-To: <4C00047D.3010404@hp.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Commit f4f914b5 (net: ipv6 bind to device issue) caused a regression with Mobile IPv6 when it changed the meaning of fl->oif to become a strict requirement of the route lookup. Instead, only force strict mode when sk->sk_bound_dev_if is set on the calling socket, getting the intended behavior and fixing the regression. Tested-by: Arnaud Ebalard Signed-off-by: Brian Haley --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 294cbe8..252d761 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -814,7 +814,7 @@ struct dst_entry * ip6_route_output(struct net *net, struct sock *sk, { int flags = 0; - if (fl->oif || rt6_need_strict(&fl->fl6_dst)) + if ((sk && sk->sk_bound_dev_if) || rt6_need_strict(&fl->fl6_dst)) flags |= RT6_LOOKUP_F_IFACE; if (!ipv6_addr_any(&fl->fl6_src))