netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Atis Elsts <atis@mikrotik.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, panther@balabit.hu,
	eric.dumazet@gmail.com, brian.haley@hp.com,
	zenczykowski@gmail.com
Subject: [PATCH] net: Use routing mark from skb in multicast forwarding routing lookups
Date: Thu, 8 Oct 2009 16:19:44 +0300	[thread overview]
Message-ID: <200910081619.44880.atis@mikrotik.com> (raw)
In-Reply-To: <20091007.135627.96995518.davem@davemloft.net>

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 <atis@mikrotik.com>
---
 net/ipv4/ipmr.c  |    1 +
 net/ipv6/ip6mr.c |    1 +
 2 files changed, 2 insertions(+)

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, }
 		}

  parent reply	other threads:[~2009-10-08 13:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-05 13:46 [PATCH] Add sk_mark route lookup support for IPv4 listening sockets, and for IPv4 multicast forwarding Atis Elsts
2009-10-07 10:19 ` David Miller
2009-10-07 12:59   ` Atis Elsts
2009-10-07 20:56     ` David Miller
2009-10-08  0:03       ` Maciej Żenczykowski
2009-10-08  5:39         ` David Miller
2009-10-14  7:51           ` Maciej Żenczykowski
2009-10-14  7:23             ` steve
2009-10-14  9:15               ` David Miller
2009-10-14  9:50                 ` Maciej Żenczykowski
2009-10-14  9:27                   ` steve
2009-10-14 11:04                     ` Atis Elsts
2009-10-14 10:16                       ` steve
2009-10-14 18:33                     ` Maciej Żenczykowski
2009-10-19  8:20                       ` steve
2009-10-19 11:38                         ` Atis Elsts
2009-10-08 13:19       ` Atis Elsts [this message]
2009-10-13 10:33         ` [PATCH] net: Use routing mark from skb in multicast forwarding routing lookups David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200910081619.44880.atis@mikrotik.com \
    --to=atis@mikrotik.com \
    --cc=brian.haley@hp.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=panther@balabit.hu \
    --cc=zenczykowski@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).