summaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_output.c
diff options
context:
space:
mode:
authorJamal Hadi Salim <jhs@mojatatu.com>2017-07-03 15:51:50 +0200
committerDavid S. Miller <davem@davemloft.net>2017-07-04 10:46:10 +0200
commite05a90ec9e1680952454ea9510da9a761a5baac9 (patch)
tree617be3ef77be766ac9a8939d7b94f6f18d8d9d3d /net/ipv4/ip_output.c
parentnet: ethernet: mediatek: fixed deadlock captured by lockdep (diff)
downloadlinux-e05a90ec9e1680952454ea9510da9a761a5baac9.tar.xz
linux-e05a90ec9e1680952454ea9510da9a761a5baac9.zip
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: 84f39b08d786 ("net: support marking accepting TCP sockets") Reviewed-by: Lorenzo Colitti <lorenzo@google.com> Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r--net/ipv4/ip_output.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 2e61e2af251a..7eb252dcecee 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);