On 17-06-12 08:34 PM, Lorenzo Colitti wrote:
On Sun, Jun 11, 2017 at 8:58 PM, Jamal Hadi Salim <j...@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