From patchwork Thu Oct 8 13:19:44 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atis Elsts X-Patchwork-Id: 35444 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.176.167]) by ozlabs.org (Postfix) with ESMTP id 189AEB7B8A for ; Fri, 9 Oct 2009 00:28:53 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758217AbZJHNUI (ORCPT ); Thu, 8 Oct 2009 09:20:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758150AbZJHNUH (ORCPT ); Thu, 8 Oct 2009 09:20:07 -0400 Received: from bute.mt.lv ([159.148.172.196]:57869 "EHLO bute.mt.lv" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758137AbZJHNUG (ORCPT ); Thu, 8 Oct 2009 09:20:06 -0400 Received: from atis-desktop.local (unknown [10.0.0.128]) by bute.mt.lv (Postfix) with ESMTP id C65D8E00E8; Thu, 8 Oct 2009 16:19:23 +0300 (EEST) From: Atis Elsts To: David Miller Subject: [PATCH] net: Use routing mark from skb in multicast forwarding routing lookups Date: Thu, 8 Oct 2009 16:19:44 +0300 User-Agent: KMail/1.9.10 Cc: netdev@vger.kernel.org, panther@balabit.hu, eric.dumazet@gmail.com, brian.haley@hp.com, zenczykowski@gmail.com References: <200910051646.34770.atis@mikrotik.com> <200910071559.56526.atis@mikrotik.com> <20091007.135627.96995518.davem@davemloft.net> In-Reply-To: <20091007.135627.96995518.davem@davemloft.net> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200910081619.44880.atis@mikrotik.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wednesday 07 October 2009 23:56:27 David Miller wrote: > > Ok submit just the else part and we'll have a look at it. > Here is a try. Use routing mark from skb in routing lookup in IPv4 and IPv6 multicast forwarding code. Signed-off-by: Atis Elsts --- net/ipv4/ipmr.c | 1 + net/ipv6/ip6mr.c | 1 + 2 files changed, 2 insertions(+) -- 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/ipv4/ipmr.c b/net/ipv4/ipmr.c index 630a56d..5522cf8 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c @@ -1248,6 +1248,7 @@ static void ipmr_queue_xmit(struct sk_buff *skb, struct mfc_cache *c, int vifi) encap = sizeof(struct iphdr); } else { struct flowi fl = { .oif = vif->link, + .mark = skb->mark, .nl_u = { .ip4_u = { .daddr = iph->daddr, .tos = RT_TOS(iph->tos) } }, diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 7161539..d98df54 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c @@ -1523,6 +1523,7 @@ static int ip6mr_forward2(struct sk_buff *skb, struct mfc6_cache *c, int vifi) fl = (struct flowi) { .oif = vif->link, + .mark = skb->mark, .nl_u = { .ip6_u = { .daddr = ipv6h->daddr, } }