aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/tcp_ipv6.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2005-12-14 02:15:40 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-01-03 16:10:37 -0500
commitca304b6104ffdd120bb6687a88a0625e58bc71cd (patch)
tree99bdf631af245808459a0a956350b9388eada7fc /net/ipv6/tcp_ipv6.c
parent8129765ac07c2455c927051e3a8b048b619b56ee (diff)
[IPV6]: Introduce inet6_rsk()
And inet6_rsk_offset in inet_request_sock, for the same reasons as inet_sock's pinfo6 member. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r--net/ipv6/tcp_ipv6.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 5a10d30cec4a..c2472d771664 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -656,7 +656,7 @@ out:
656static int tcp_v6_send_synack(struct sock *sk, struct request_sock *req, 656static int tcp_v6_send_synack(struct sock *sk, struct request_sock *req,
657 struct dst_entry *dst) 657 struct dst_entry *dst)
658{ 658{
659 struct tcp6_request_sock *treq = tcp6_rsk(req); 659 struct inet6_request_sock *treq = inet6_rsk(req);
660 struct ipv6_pinfo *np = inet6_sk(sk); 660 struct ipv6_pinfo *np = inet6_sk(sk);
661 struct sk_buff * skb; 661 struct sk_buff * skb;
662 struct ipv6_txoptions *opt = NULL; 662 struct ipv6_txoptions *opt = NULL;
@@ -722,8 +722,8 @@ done:
722 722
723static void tcp_v6_reqsk_destructor(struct request_sock *req) 723static void tcp_v6_reqsk_destructor(struct request_sock *req)
724{ 724{
725 if (tcp6_rsk(req)->pktopts) 725 if (inet6_rsk(req)->pktopts)
726 kfree_skb(tcp6_rsk(req)->pktopts); 726 kfree_skb(inet6_rsk(req)->pktopts);
727} 727}
728 728
729static struct request_sock_ops tcp6_request_sock_ops = { 729static struct request_sock_ops tcp6_request_sock_ops = {
@@ -956,7 +956,7 @@ static struct sock *tcp_v6_hnd_req(struct sock *sk,struct sk_buff *skb)
956 */ 956 */
957static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb) 957static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
958{ 958{
959 struct tcp6_request_sock *treq; 959 struct inet6_request_sock *treq;
960 struct ipv6_pinfo *np = inet6_sk(sk); 960 struct ipv6_pinfo *np = inet6_sk(sk);
961 struct tcp_options_received tmp_opt; 961 struct tcp_options_received tmp_opt;
962 struct tcp_sock *tp = tcp_sk(sk); 962 struct tcp_sock *tp = tcp_sk(sk);
@@ -981,7 +981,7 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
981 if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) 981 if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1)
982 goto drop; 982 goto drop;
983 983
984 req = reqsk_alloc(&tcp6_request_sock_ops); 984 req = inet6_reqsk_alloc(&tcp6_request_sock_ops);
985 if (req == NULL) 985 if (req == NULL)
986 goto drop; 986 goto drop;
987 987
@@ -994,7 +994,7 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
994 tmp_opt.tstamp_ok = tmp_opt.saw_tstamp; 994 tmp_opt.tstamp_ok = tmp_opt.saw_tstamp;
995 tcp_openreq_init(req, &tmp_opt, skb); 995 tcp_openreq_init(req, &tmp_opt, skb);
996 996
997 treq = tcp6_rsk(req); 997 treq = inet6_rsk(req);
998 ipv6_addr_copy(&treq->rmt_addr, &skb->nh.ipv6h->saddr); 998 ipv6_addr_copy(&treq->rmt_addr, &skb->nh.ipv6h->saddr);
999 ipv6_addr_copy(&treq->loc_addr, &skb->nh.ipv6h->daddr); 999 ipv6_addr_copy(&treq->loc_addr, &skb->nh.ipv6h->daddr);
1000 TCP_ECN_create_request(req, skb->h.th); 1000 TCP_ECN_create_request(req, skb->h.th);
@@ -1035,7 +1035,7 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
1035 struct request_sock *req, 1035 struct request_sock *req,
1036 struct dst_entry *dst) 1036 struct dst_entry *dst)
1037{ 1037{
1038 struct tcp6_request_sock *treq = tcp6_rsk(req); 1038 struct inet6_request_sock *treq = inet6_rsk(req);
1039 struct ipv6_pinfo *newnp, *np = inet6_sk(sk); 1039 struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
1040 struct tcp6_sock *newtcp6sk; 1040 struct tcp6_sock *newtcp6sk;
1041 struct inet_sock *newinet; 1041 struct inet_sock *newinet;
@@ -1723,14 +1723,13 @@ static int tcp_v6_destroy_sock(struct sock *sk)
1723static void get_openreq6(struct seq_file *seq, 1723static void get_openreq6(struct seq_file *seq,
1724 struct sock *sk, struct request_sock *req, int i, int uid) 1724 struct sock *sk, struct request_sock *req, int i, int uid)
1725{ 1725{
1726 struct in6_addr *dest, *src;
1727 int ttd = req->expires - jiffies; 1726 int ttd = req->expires - jiffies;
1727 struct in6_addr *src = &inet6_rsk(req)->loc_addr;
1728 struct in6_addr *dest = &inet6_rsk(req)->rmt_addr;
1728 1729
1729 if (ttd < 0) 1730 if (ttd < 0)
1730 ttd = 0; 1731 ttd = 0;
1731 1732
1732 src = &tcp6_rsk(req)->loc_addr;
1733 dest = &tcp6_rsk(req)->rmt_addr;
1734 seq_printf(seq, 1733 seq_printf(seq,
1735 "%4d: %08X%08X%08X%08X:%04X %08X%08X%08X%08X:%04X " 1734 "%4d: %08X%08X%08X%08X:%04X %08X%08X%08X%08X:%04X "
1736 "%02X %08X:%08X %02X:%08lX %08X %5d %8d %d %d %p\n", 1735 "%02X %08X:%08X %02X:%08lX %08X %5d %8d %d %d %p\n",