Commit 1e306ec
tcp: fix possible sk_priority leak in tcp_v4_send_reset()
When tcp_v4_send_reset() is called with @sk == NULL,
we do not change ctl_sk->sk_priority, which could have been
set from a prior invocation.
Change tcp_v4_send_reset() to set sk_priority and sk_mark
fields before calling ip_send_unicast_reply().
This means tcp_v4_send_reset() and tcp_v4_send_ack()
no longer have to clear ctl_sk->sk_mark after
their call to ip_send_unicast_reply().
Fixes: f6c0f5d ("tcp: honor SO_PRIORITY in TIME_WAIT state")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Antoine Tenart <atenart@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 6d4486e commit 1e306ec
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
829 | 829 | | |
830 | 830 | | |
831 | 831 | | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
832 | 835 | | |
833 | 836 | | |
834 | 837 | | |
835 | 838 | | |
836 | 839 | | |
837 | 840 | | |
838 | 841 | | |
839 | | - | |
840 | 842 | | |
841 | 843 | | |
842 | 844 | | |
| |||
935 | 937 | | |
936 | 938 | | |
937 | 939 | | |
938 | | - | |
939 | 940 | | |
940 | 941 | | |
941 | 942 | | |
| |||
0 commit comments