diff options
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index eab10bc7ff87..910603cd12d2 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -949,7 +949,7 @@ static void tcp_v6_send_reset(struct sock *sk, struct sk_buff *skb) | |||
949 | struct flowi fl; | 949 | struct flowi fl; |
950 | struct net *net = dev_net(skb->dst->dev); | 950 | struct net *net = dev_net(skb->dst->dev); |
951 | struct sock *ctl_sk = net->ipv6.tcp_sk; | 951 | struct sock *ctl_sk = net->ipv6.tcp_sk; |
952 | unsigned int tot_len = sizeof(*th); | 952 | unsigned int tot_len = sizeof(struct tcphdr); |
953 | #ifdef CONFIG_TCP_MD5SIG | 953 | #ifdef CONFIG_TCP_MD5SIG |
954 | struct tcp_md5sig_key *key; | 954 | struct tcp_md5sig_key *key; |
955 | #endif | 955 | #endif |
@@ -1033,7 +1033,6 @@ static void tcp_v6_send_reset(struct sock *sk, struct sk_buff *skb) | |||
1033 | * namespace | 1033 | * namespace |
1034 | */ | 1034 | */ |
1035 | if (!ip6_dst_lookup(ctl_sk, &buff->dst, &fl)) { | 1035 | if (!ip6_dst_lookup(ctl_sk, &buff->dst, &fl)) { |
1036 | |||
1037 | if (xfrm_lookup(&buff->dst, &fl, NULL, 0) >= 0) { | 1036 | if (xfrm_lookup(&buff->dst, &fl, NULL, 0) >= 0) { |
1038 | ip6_xmit(ctl_sk, buff, &fl, NULL, 0); | 1037 | ip6_xmit(ctl_sk, buff, &fl, NULL, 0); |
1039 | TCP_INC_STATS_BH(net, TCP_MIB_OUTSEGS); | 1038 | TCP_INC_STATS_BH(net, TCP_MIB_OUTSEGS); |
@@ -1070,13 +1069,13 @@ static void tcp_v6_send_ack(struct sk_buff *skb, u32 seq, u32 ack, u32 win, u32 | |||
1070 | 1069 | ||
1071 | skb_reserve(buff, MAX_HEADER + sizeof(struct ipv6hdr) + tot_len); | 1070 | skb_reserve(buff, MAX_HEADER + sizeof(struct ipv6hdr) + tot_len); |
1072 | 1071 | ||
1073 | t1 = (struct tcphdr *) skb_push(buff,tot_len); | 1072 | t1 = (struct tcphdr *) skb_push(buff, tot_len); |
1074 | 1073 | ||
1075 | /* Swap the send and the receive. */ | 1074 | /* Swap the send and the receive. */ |
1076 | memset(t1, 0, sizeof(*t1)); | 1075 | memset(t1, 0, sizeof(*t1)); |
1077 | t1->dest = th->source; | 1076 | t1->dest = th->source; |
1078 | t1->source = th->dest; | 1077 | t1->source = th->dest; |
1079 | t1->doff = tot_len/4; | 1078 | t1->doff = tot_len / 4; |
1080 | t1->seq = htonl(seq); | 1079 | t1->seq = htonl(seq); |
1081 | t1->ack_seq = htonl(ack); | 1080 | t1->ack_seq = htonl(ack); |
1082 | t1->ack = 1; | 1081 | t1->ack = 1; |