All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gerd v. Egidy" <lists@egidy.de>
To: hadi@cyberus.ca
Cc: netdev@vger.kernel.org
Subject: Re: xfrm by MARK: tcp problems when mark for in and out differ
Date: Thu, 14 Oct 2010 15:01:59 +0200	[thread overview]
Message-ID: <201010141501.59145.lists@egidy.de> (raw)
In-Reply-To: <1287057741.3756.6.camel@bigi>

Hi Jamal,

> > -> incoming packets are without mark, outgoing packets are marked with 5
> 
> You could use tc ingress path to mark incoming packets. Example:

In my full setup I do exactly that. What I posted was a minimized setup to 
just show the problem.

I have a complex set of netfilter rules and routing tables to allow several 
ways of doing NAT on ipsec. The rules need different marks on packets coming 
from / going to the vpn to correctly distinguish packets in the forwarding 
case.

I did further testing, 2.6.36-rc7 has the problem too.

> When the SYN-ACK hits __xfrm_lookup, the value in fl->mark is 0 
> (more precisely: the mark value used in the incoming packet).

this is wrong, the value in fl->mark is always 0. I must have confused some 
data in my debug printks.

So it seems like the fl->mark is never initialized with the packet mark in the 
first place. What would be the correct stage in the kernel network stack to do 
that?

Kind regards,

Gerd

-- 
Address (better: trap) for people I really don't want to get mail from:
jonas@cactusamerica.com

  reply	other threads:[~2010-10-14 13:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-13 13:57 xfrm by MARK: tcp problems when mark for in and out differ Gerd v. Egidy
2010-10-14 12:02 ` jamal
2010-10-14 13:01   ` Gerd v. Egidy [this message]
2010-10-14 13:14     ` jamal
2010-10-14 14:14       ` -j MARK in raw vs. mangle (was Re: xfrm by MARK: tcp problems when mark for in and out differ) Gerd v. Egidy
2010-10-14 12:05 ` xfrm by MARK: tcp problems when mark for in and out differ jamal

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=201010141501.59145.lists@egidy.de \
    --to=lists@egidy.de \
    --cc=hadi@cyberus.ca \
    --cc=netdev@vger.kernel.org \
    /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.