aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv6/tcp_ipv6.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 910603cd12d2..1941c5c888d3 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -950,6 +950,7 @@ static void tcp_v6_send_reset(struct sock *sk, struct sk_buff *skb)
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(struct tcphdr); 952 unsigned int tot_len = sizeof(struct tcphdr);
953 __be32 *topt;
953#ifdef CONFIG_TCP_MD5SIG 954#ifdef CONFIG_TCP_MD5SIG
954 struct tcp_md5sig_key *key; 955 struct tcp_md5sig_key *key;
955#endif 956#endif
@@ -999,14 +1000,13 @@ static void tcp_v6_send_reset(struct sock *sk, struct sk_buff *skb)
999 + skb->len - (th->doff<<2)); 1000 + skb->len - (th->doff<<2));
1000 } 1001 }
1001 1002
1003 topt = (__be32 *)(t1 + 1);
1004
1002#ifdef CONFIG_TCP_MD5SIG 1005#ifdef CONFIG_TCP_MD5SIG
1003 if (key) { 1006 if (key) {
1004 __be32 *opt = (__be32*)(t1 + 1); 1007 *topt++ = htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
1005 opt[0] = htonl((TCPOPT_NOP << 24) | 1008 (TCPOPT_MD5SIG << 8) | TCPOLEN_MD5SIG);
1006 (TCPOPT_NOP << 16) | 1009 tcp_v6_md5_hash_hdr((__u8 *)topt, key,
1007 (TCPOPT_MD5SIG << 8) |
1008 TCPOLEN_MD5SIG);
1009 tcp_v6_md5_hash_hdr((__u8 *)&opt[1], key,
1010 &ipv6_hdr(skb)->saddr, 1010 &ipv6_hdr(skb)->saddr,
1011 &ipv6_hdr(skb)->daddr, t1); 1011 &ipv6_hdr(skb)->daddr, t1);
1012 } 1012 }