All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Boutin Maël" <mael.boutin@laposte.net>
To: Yasuyuki KOZAKAI <yasuyuki.kozakai@toshiba.co.jp>
Cc: netfilter@lists.netfilter.org
Subject: Re: Re IPv6 MARK support
Date: Thu, 1 Mar 2007 11:32:16 +0100	[thread overview]
Message-ID: <2acb06d50703010232k64325368l2cfab895b460c9b7@mail.gmail.com> (raw)
In-Reply-To: <200702281238.l1SCcE4F016826@toshiba.co.jp>

Sorry, i did not answer to the netfilter list.

It does not work with the 2.6.20 kernel although the patch is applied.
I followed the functions calls and i really do not understand what is
missing. In my opinion the ip rule is matched and applied to the
packet (the dst_entry seems to be good, at least the net_device
structure). The skb->dev field contain the good device (eth0) from
which the paket should leave the terminal (tested in function
ip6_output2) however the pcket continues to leave through the default
interface.

I am not an expert of Linux and the IPv6 stack, so your help would be
greatly appreciated !

On 2/28/07, Yasuyuki KOZAKAI <yasuyuki.kozakai@toshiba.co.jp> wrote:
>
> 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,
>


-- 
echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq'|dc


  parent reply	other threads:[~2007-03-01 10:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-28  8:04 Re IPv6 MARK support Boutin Maël
2007-02-28  9:55 ` Boutin Maël
2007-02-28 10:53   ` Yasuyuki KOZAKAI
2007-02-28 11:36     ` Yasuyuki KOZAKAI
     [not found]     ` <200702281136.l1SBaJLe019021@toshiba.co.jp>
2007-02-28 11:53       ` Boutin Maël
2007-02-28 12:38         ` Yasuyuki KOZAKAI
     [not found]         ` <200702281238.l1SCcE4F016826@toshiba.co.jp>
2007-03-01 10:32           ` Boutin Maël [this message]
2007-03-01 11:05             ` Boutin Maël
2007-03-01 15:18               ` Pascal Hambourg
2007-03-01 15:42                 ` Eray Aslan
2007-03-01 21:31                   ` Boutin Maël

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=2acb06d50703010232k64325368l2cfab895b460c9b7@mail.gmail.com \
    --to=mael.boutin@laposte.net \
    --cc=netfilter@lists.netfilter.org \
    --cc=yasuyuki.kozakai@toshiba.co.jp \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.