* [PATCH net v2 0/1] reflect mark on tcp syn ack packets
@ 2017-07-03 13:51 Jamal Hadi Salim
2017-07-03 13:51 ` [PATCH net v2 1/1] net: " Jamal Hadi Salim
0 siblings, 1 reply; 3+ messages in thread
From: Jamal Hadi Salim @ 2017-07-03 13:51 UTC (permalink / raw)
To: davem; +Cc: netdev, lorenzo, Jamal Hadi Salim
From: Jamal Hadi Salim <jhs@mojatatu.com>
Changes from v1(Lorenzo):
unconditionally set skb->mark = ireq->ir_mark;
Jamal Hadi Salim (1):
net: reflect mark on tcp syn ack packets
net/ipv4/ip_output.c | 3 ++-
net/ipv4/tcp_output.c | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH net v2 1/1] net: reflect mark on tcp syn ack packets
2017-07-03 13:51 [PATCH net v2 0/1] reflect mark on tcp syn ack packets Jamal Hadi Salim
@ 2017-07-03 13:51 ` Jamal Hadi Salim
2017-07-04 8:46 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Jamal Hadi Salim @ 2017-07-03 13:51 UTC (permalink / raw)
To: davem; +Cc: netdev, lorenzo, Jamal Hadi Salim
From: Jamal Hadi Salim <jhs@mojatatu.com>
SYN-ACK responses on a server in response to a SYN from a client
did not get the injected skb mark that was tagged on the SYN packet.
Fixes: 84f39b08d786 ("net: support marking accepting TCP sockets")
Reviewed-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
net/ipv4/ip_output.c | 3 ++-
net/ipv4/tcp_output.c | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 532b36e..94b36d9 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -173,7 +173,8 @@ int ip_build_and_send_pkt(struct sk_buff *skb, const struct sock *sk,
}
skb->priority = sk->sk_priority;
- skb->mark = sk->sk_mark;
+ if (!skb->mark)
+ skb->mark = sk->sk_mark;
/* Send it out. */
return ip_local_out(net, skb->sk, skb);
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 4858e19..b1604d0 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -3134,6 +3134,7 @@ struct sk_buff *tcp_make_synack(const struct sock *sk, struct dst_entry *dst,
tcp_ecn_make_synack(req, th);
th->source = htons(ireq->ir_num);
th->dest = ireq->ir_rmt_port;
+ skb->mark = ireq->ir_mark;
/* Setting of flags are superfluous here for callers (and ECE is
* not even correctly set)
*/
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net v2 1/1] net: reflect mark on tcp syn ack packets
2017-07-03 13:51 ` [PATCH net v2 1/1] net: " Jamal Hadi Salim
@ 2017-07-04 8:46 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2017-07-04 8:46 UTC (permalink / raw)
To: jhs; +Cc: netdev, lorenzo
From: Jamal Hadi Salim <jhs@mojatatu.com>
Date: Mon, 3 Jul 2017 09:51:50 -0400
> From: Jamal Hadi Salim <jhs@mojatatu.com>
>
> SYN-ACK responses on a server in response to a SYN from a client
> did not get the injected skb mark that was tagged on the SYN packet.
>
> Fixes: 84f39b08d786 ("net: support marking accepting TCP sockets")
> Reviewed-by: Lorenzo Colitti <lorenzo@google.com>
> Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Applied, thanks Jamal.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-04 8:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-03 13:51 [PATCH net v2 0/1] reflect mark on tcp syn ack packets Jamal Hadi Salim
2017-07-03 13:51 ` [PATCH net v2 1/1] net: " Jamal Hadi Salim
2017-07-04 8:46 ` David Miller
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.