NetFilter
[Top] [All Lists]

Re: Re IPv6 MARK support

To: mael.boutin@laposte.net
Subject: Re: Re IPv6 MARK support
From: Yasuyuki KOZAKAI <yasuyuki.kozakai@toshiba.co.jp>
Date: Wed, 28 Feb 2007 21:38:13 +0900 (JST)
Cc: netfilter@lists.netfilter.org
Delivered-to: sp-com-lists@consult.net
Delivered-to: netfilter-list1@securepoint.com
In-reply-to: <2acb06d50702280353q10529555vebd20e93ee7040e1@mail.gmail.com>
List-archive: </pipermail/netfilter>
List-help: <mailto:netfilter-request@lists.netfilter.org?subject=help>
List-id: General discussion and user questions <netfilter.lists.netfilter.org>
List-post: <mailto:netfilter@lists.netfilter.org>
List-subscribe: <https://lists.netfilter.org/mailman/listinfo/netfilter>, <mailto:netfilter-request@lists.netfilter.org?subject=subscribe>
List-unsubscribe: <https://lists.netfilter.org/mailman/listinfo/netfilter>, <mailto:netfilter-request@lists.netfilter.org?subject=unsubscribe>
References: <200702281053.l1SArNIC025800@toshiba.co.jp> <200702281136.l1SBaJLe019021@toshiba.co.jp> <2acb06d50702280353q10529555vebd20e93ee7040e1@mail.gmail.com>
Sender: netfilter-bounces@lists.netfilter.org
Hi,

From: "Boutin Maël" <mael.boutin@laposte.net>
Date: Wed, 28 Feb 2007 12:53:44 +0100

> Thanks for the patch, however it does not work, the kernel does not compile :
> 
> line 18:
> 
> struct sk_buff has no member named mark (it should be nfmark no ?)
> unknown field "mark" specified in initializer

Ah yes. nfmark is renamed to mark at 2.6.20.

> To answer your previous questions :
> yes i have logs in the kernel for both out6 and post6.

Thanks.

> Of course i can try 2.6.20 but it seems to me that there is the same
> problem (i tried before)

I think so.

> In my opinion the problem is due to the fact that the routing decision
> is made before OUTPUT chain but not relaunched once the nfmark routing
> key is changed which is i think how it should work.

Yes. That is what ip6_route_me_harder does.

How about this for 2.6.19 ?

[NETFILTER]: ip6_route_me_harder should take into account mark

Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>

diff --git a/net/ipv6/netfilter.c b/net/ipv6/netfilter.c
index f6294e5..ca50b58 100644
--- a/net/ipv6/netfilter.c
+++ b/net/ipv6/netfilter.c
@@ -15,6 +15,7 @@ int ip6_route_me_harder(struct sk_buff *
        struct dst_entry *dst;
        struct flowi fl = {
                .oif = skb->sk ? skb->sk->sk_bound_dev_if : 0,
+               .mark = skb->nfmark,
                .nl_u =
                { .ip6_u =
                  { .daddr = iph->daddr,


<Prev in Thread] Current Thread [Next in Thread>