aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/tcp_ipv6.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-12-10 15:48:20 -0500
committerDavid S. Miller <davem@davemloft.net>2014-12-10 15:48:20 -0500
commit22f10923dd39141785273e423b9acf347297e15f (patch)
treecc1f19103817433a426b3e329d6326f5e9d8e8f7 /net/ipv6/tcp_ipv6.c
parent785c20a08bead1e58ad53f2dc324782da7a0c9ea (diff)
parent69204cf7eb9c5a72067ce6922d4699378251d053 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/ethernet/amd/xgbe/xgbe-desc.c drivers/net/ethernet/renesas/sh_eth.c Overlapping changes in both conflict cases. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r--net/ipv6/tcp_ipv6.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index d06af89162f1..5ff87805258e 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -787,16 +787,16 @@ static const struct tcp_request_sock_ops tcp_request_sock_ipv6_ops = {
787 .queue_hash_add = inet6_csk_reqsk_queue_hash_add, 787 .queue_hash_add = inet6_csk_reqsk_queue_hash_add,
788}; 788};
789 789
790static void tcp_v6_send_response(struct sk_buff *skb, u32 seq, u32 ack, u32 win, 790static void tcp_v6_send_response(struct sock *sk, struct sk_buff *skb, u32 seq,
791 u32 tsval, u32 tsecr, int oif, 791 u32 ack, u32 win, u32 tsval, u32 tsecr,
792 struct tcp_md5sig_key *key, int rst, u8 tclass, 792 int oif, struct tcp_md5sig_key *key, int rst,
793 u32 label) 793 u8 tclass, u32 label)
794{ 794{
795 const struct tcphdr *th = tcp_hdr(skb); 795 const struct tcphdr *th = tcp_hdr(skb);
796 struct tcphdr *t1; 796 struct tcphdr *t1;
797 struct sk_buff *buff; 797 struct sk_buff *buff;
798 struct flowi6 fl6; 798 struct flowi6 fl6;
799 struct net *net = dev_net(skb_dst(skb)->dev); 799 struct net *net = sk ? sock_net(sk) : dev_net(skb_dst(skb)->dev);
800 struct sock *ctl_sk = net->ipv6.tcp_sk; 800 struct sock *ctl_sk = net->ipv6.tcp_sk;
801 unsigned int tot_len = sizeof(struct tcphdr); 801 unsigned int tot_len = sizeof(struct tcphdr);
802 struct dst_entry *dst; 802 struct dst_entry *dst;
@@ -946,7 +946,7 @@ static void tcp_v6_send_reset(struct sock *sk, struct sk_buff *skb)
946 (th->doff << 2); 946 (th->doff << 2);
947 947
948 oif = sk ? sk->sk_bound_dev_if : 0; 948 oif = sk ? sk->sk_bound_dev_if : 0;
949 tcp_v6_send_response(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);
950 950
951#ifdef CONFIG_TCP_MD5SIG 951#ifdef CONFIG_TCP_MD5SIG
952release_sk1: 952release_sk1:
@@ -957,13 +957,13 @@ release_sk1:
957#endif 957#endif
958} 958}
959 959
960static void tcp_v6_send_ack(struct sk_buff *skb, u32 seq, u32 ack, 960static void tcp_v6_send_ack(struct sock *sk, struct sk_buff *skb, u32 seq,
961 u32 win, u32 tsval, u32 tsecr, int oif, 961 u32 ack, u32 win, u32 tsval, u32 tsecr, int oif,
962 struct tcp_md5sig_key *key, u8 tclass, 962 struct tcp_md5sig_key *key, u8 tclass,
963 u32 label) 963 u32 label)
964{ 964{
965 tcp_v6_send_response(skb, seq, ack, win, tsval, tsecr, oif, key, 0, tclass, 965 tcp_v6_send_response(sk, skb, seq, ack, win, tsval, tsecr, oif, key, 0,
966 label); 966 tclass, label);
967} 967}
968 968
969static void tcp_v6_timewait_ack(struct sock *sk, struct sk_buff *skb) 969static void tcp_v6_timewait_ack(struct sock *sk, struct sk_buff *skb)
@@ -971,7 +971,7 @@ static void tcp_v6_timewait_ack(struct sock *sk, struct sk_buff *skb)
971 struct inet_timewait_sock *tw = inet_twsk(sk); 971 struct inet_timewait_sock *tw = inet_twsk(sk);
972 struct tcp_timewait_sock *tcptw = tcp_twsk(sk); 972 struct tcp_timewait_sock *tcptw = tcp_twsk(sk);
973 973
974 tcp_v6_send_ack(skb, tcptw->tw_snd_nxt, tcptw->tw_rcv_nxt, 974 tcp_v6_send_ack(sk, skb, tcptw->tw_snd_nxt, tcptw->tw_rcv_nxt,
975 tcptw->tw_rcv_wnd >> tw->tw_rcv_wscale, 975 tcptw->tw_rcv_wnd >> tw->tw_rcv_wscale,
976 tcp_time_stamp + tcptw->tw_ts_offset, 976 tcp_time_stamp + tcptw->tw_ts_offset,
977 tcptw->tw_ts_recent, tw->tw_bound_dev_if, tcp_twsk_md5_key(tcptw), 977 tcptw->tw_ts_recent, tw->tw_bound_dev_if, tcp_twsk_md5_key(tcptw),
@@ -986,10 +986,10 @@ static void tcp_v6_reqsk_send_ack(struct sock *sk, struct sk_buff *skb,
986 /* sk->sk_state == TCP_LISTEN -> for regular TCP_SYN_RECV 986 /* sk->sk_state == TCP_LISTEN -> for regular TCP_SYN_RECV
987 * sk->sk_state == TCP_SYN_RECV -> for Fast Open. 987 * sk->sk_state == TCP_SYN_RECV -> for Fast Open.
988 */ 988 */
989 tcp_v6_send_ack(skb, (sk->sk_state == TCP_LISTEN) ? 989 tcp_v6_send_ack(sk, skb, (sk->sk_state == TCP_LISTEN) ?
990 tcp_rsk(req)->snt_isn + 1 : tcp_sk(sk)->snd_nxt, 990 tcp_rsk(req)->snt_isn + 1 : tcp_sk(sk)->snd_nxt,
991 tcp_rsk(req)->rcv_nxt, 991 tcp_rsk(req)->rcv_nxt, req->rcv_wnd,
992 req->rcv_wnd, tcp_time_stamp, req->ts_recent, sk->sk_bound_dev_if, 992 tcp_time_stamp, req->ts_recent, sk->sk_bound_dev_if,
993 tcp_v6_md5_do_lookup(sk, &ipv6_hdr(skb)->daddr), 993 tcp_v6_md5_do_lookup(sk, &ipv6_hdr(skb)->daddr),
994 0, 0); 994 0, 0);
995} 995}