netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Beverley <andy@andybev.com>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: "Maciej Żenczykowski" <zenczykowski@gmail.com>,
	netfilter-devel@vger.kernel.org
Subject: Re: Accessing packet marking functions
Date: Sun, 24 Oct 2010 18:30:23 +0100	[thread overview]
Message-ID: <1287941423.1550.15.camel@andybev> (raw)
In-Reply-To: <alpine.LSU.2.01.1006300844260.2225@obet.zrqbmnf.qr>

> >All I want to do is retain a packet's mark from its arrival into Squid,
> >onto its transmission to the client. Something like this:
> >
> >
> >ppp0 -> PREROUTING -> Squid -> POSTROUTING -> eth0
> >
> >            ^^                      ^^
> >         Set Mark               Read mark
> >
> >If this isn't possible then please tell me.
> 
> Hm, interesting case. I would say you could:
> 
>  - use CONNMARK in PREROUTING/INPUT
>  - use libnetfilter_conntrack to query the connmark from within squid
>    (since squid has address and port, that should identify the 
>    connection within the nfct table)
>  - use the so-obtained ctmark to populate the new socket's skmark

Thanks for this suggestion. Thought I'd drop a quick email (for
completeness) to say that the patch for this has now been included into
Squid. So, it is now possible for Squid to retain the mark on packets
for items that aren't cached, or set a mark on packets when items are
fetched from the cache.

Andy



  reply	other threads:[~2010-10-24 18:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-19 16:42 Accessing packet marking functions Andrew Beverley
2010-06-19 20:01 ` Jan Engelhardt
2010-06-19 20:50   ` Andrew Beverley
2010-06-20 11:16   ` Andrew Beverley
2010-06-20 11:52     ` Jan Engelhardt
2010-06-20 12:31       ` Andrew Beverley
2010-06-22  6:16         ` Patrick McHardy
2010-06-28 21:21           ` Andrew Beverley
2010-06-28 21:45             ` Jan Engelhardt
2010-06-29 21:22   ` Andrew Beverley
2010-06-29 21:35     ` Maciej Żenczykowski
2010-06-30  6:14       ` Andrew Beverley
2010-06-30  6:15         ` Jan Engelhardt
2010-06-30  6:32           ` Andrew Beverley
2010-06-30  6:47             ` Jan Engelhardt
2010-10-24 17:30               ` Andrew Beverley [this message]
2010-10-24 23:55                 ` Jan Engelhardt

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=1287941423.1550.15.camel@andybev \
    --to=andy@andybev.com \
    --cc=jengelh@medozas.de \
    --cc=netfilter-devel@vger.kernel.org \
    --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).