Netdev List
 help / color / mirror / Atom feed
From: Jamal Hadi Salim <jhs@mojatatu.com>
To: Lorenzo Colitti <lorenzo@google.com>
Cc: David Miller <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	mrv@mojatatu.com, hadi@mojatatu.com
Subject: Re: [PATCH net-next 1/1] net: reflect mark on tcp syn ack packets
Date: Tue, 13 Jun 2017 07:33:40 -0400	[thread overview]
Message-ID: <b6e180c2-b17d-38fd-27cc-6d92ff38e8dd@mojatatu.com> (raw)
In-Reply-To: <CAKD1Yr1GcK3XQpyx=p-EHWXHax_+-HXpHFT6uWZY_9ovv8V7mA@mail.gmail.com>

On 17-06-12 08:34 PM, Lorenzo Colitti wrote:
> On Sun, Jun 11, 2017 at 8:58 PM, Jamal Hadi Salim <jhs@mojatatu.com> wrote:
>>> Maybe this should both be "inet_request_mark()"?

> As David says, the tcp_fwmark_accept sysctl is not really appropriate
> for synack packets - what it does is ensure that when a connection is
> accepted, sk->sk_mark is set to the mark of the incoming skb.
> 
> I think the correct behaviour here is to to honour the
> ip_fwmark_reflect sysctl instead, and if it's enabled, make the synack
> mark be the same as the the incoming syn mark.
> 

Ok, so in the patch I sent then change this:

+       if (sock_net(sk)->ipv4.sysctl_tcp_fwmark_accept)
+               skb->mark = ireq->ir_mark;

to:

+       if (sock_net(sk)->ipv4.fwmark_reflect)
+               skb->mark = ireq->ir_mark;

correct?

cheers,
jamal

  reply	other threads:[~2017-06-13 11:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-10 13:31 [PATCH net-next 1/1] net: reflect mark on tcp syn ack packets Jamal Hadi Salim
2017-06-10 23:02 ` David Miller
2017-06-11 11:58   ` Jamal Hadi Salim
2017-06-13  0:34     ` Lorenzo Colitti
2017-06-13 11:33       ` Jamal Hadi Salim [this message]
2017-06-13 13:58 ` Lorenzo Colitti
2017-06-18 12:45   ` Jamal Hadi Salim

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=b6e180c2-b17d-38fd-27cc-6d92ff38e8dd@mojatatu.com \
    --to=jhs@mojatatu.com \
    --cc=davem@davemloft.net \
    --cc=hadi@mojatatu.com \
    --cc=lorenzo@google.com \
    --cc=mrv@mojatatu.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox