Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e05a90ec authored by Jamal Hadi Salim's avatar Jamal Hadi Salim Committed by David S. Miller
Browse files

net: reflect mark on tcp syn ack packets



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: 84f39b08 ("net: support marking accepting TCP sockets")
Reviewed-by: default avatarLorenzo Colitti <lorenzo@google.com>
Signed-off-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8d32e062
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -173,6 +173,7 @@ int ip_build_and_send_pkt(struct sk_buff *skb, const struct sock *sk,
	}

	skb->priority = sk->sk_priority;
	if (!skb->mark)
		skb->mark = sk->sk_mark;

	/* Send it out. */
+1 −0
Original line number Diff line number Diff line
@@ -3213,6 +3213,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)
	 */