diff options
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index ae83615b7f6d..0e2529958b52 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -69,6 +69,8 @@ | |||
69 | #include <crypto/hash.h> | 69 | #include <crypto/hash.h> |
70 | #include <linux/scatterlist.h> | 70 | #include <linux/scatterlist.h> |
71 | 71 | ||
72 | #include <trace/events/tcp.h> | ||
73 | |||
72 | static void tcp_v6_send_reset(const struct sock *sk, struct sk_buff *skb); | 74 | static void tcp_v6_send_reset(const struct sock *sk, struct sk_buff *skb); |
73 | static void tcp_v6_reqsk_send_ack(const struct sock *sk, struct sk_buff *skb, | 75 | static void tcp_v6_reqsk_send_ack(const struct sock *sk, struct sk_buff *skb, |
74 | struct request_sock *req); | 76 | struct request_sock *req); |
@@ -890,7 +892,7 @@ static void tcp_v6_send_reset(const struct sock *sk, struct sk_buff *skb) | |||
890 | int genhash; | 892 | int genhash; |
891 | struct sock *sk1 = NULL; | 893 | struct sock *sk1 = NULL; |
892 | #endif | 894 | #endif |
893 | int oif; | 895 | int oif = 0; |
894 | 896 | ||
895 | if (th->rst) | 897 | if (th->rst) |
896 | return; | 898 | return; |
@@ -939,7 +941,11 @@ static void tcp_v6_send_reset(const struct sock *sk, struct sk_buff *skb) | |||
939 | ack_seq = ntohl(th->seq) + th->syn + th->fin + skb->len - | 941 | ack_seq = ntohl(th->seq) + th->syn + th->fin + skb->len - |
940 | (th->doff << 2); | 942 | (th->doff << 2); |
941 | 943 | ||
942 | oif = sk ? sk->sk_bound_dev_if : 0; | 944 | if (sk) { |
945 | oif = sk->sk_bound_dev_if; | ||
946 | trace_tcp_send_reset(sk, skb); | ||
947 | } | ||
948 | |||
943 | tcp_v6_send_response(sk, skb, seq, ack_seq, 0, 0, 0, oif, key, 1, 0, 0); | 949 | tcp_v6_send_response(sk, skb, seq, ack_seq, 0, 0, 0, oif, key, 1, 0, 0); |
944 | 950 | ||
945 | #ifdef CONFIG_TCP_MD5SIG | 951 | #ifdef CONFIG_TCP_MD5SIG |