Merge to Fedora kernel-2.6.7-1.441
[linux-2.6.git] / net / ipv6 / tcp_ipv6.c
index 7a42f2e..1c8b8ec 100644 (file)
@@ -536,8 +536,7 @@ static int tcp_v6_hash_connect(struct sock *sk)
 
 static __inline__ int tcp_v6_iif(struct sk_buff *skb)
 {
-       struct inet6_skb_parm *opt = (struct inet6_skb_parm *) skb->cb;
-       return opt->iif;
+       return IP6CB(skb)->iif;
 }
 
 static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, 
@@ -879,7 +878,7 @@ static int tcp_v6_send_synack(struct sock *sk, struct open_request *req,
                    np->rxopt.bits.srcrt == 2 &&
                    req->af.v6_req.pktopts) {
                        struct sk_buff *pktopts = req->af.v6_req.pktopts;
-                       struct inet6_skb_parm *rxopt = (struct inet6_skb_parm *)pktopts->cb;
+                       struct inet6_skb_parm *rxopt = IP6CB(pktopts);
                        if (rxopt->srcrt)
                                opt = ipv6_invert_rthdr(sk, (struct ipv6_rt_hdr*)(pktopts->nh.raw + rxopt->srcrt));
                }
@@ -932,7 +931,7 @@ static struct or_calltable or_ipv6 = {
 static int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb)
 {
        struct ipv6_pinfo *np = inet6_sk(sk);
-       struct inet6_skb_parm *opt = (struct inet6_skb_parm *)skb->cb;
+       struct inet6_skb_parm *opt = IP6CB(skb);
 
        if (np->rxopt.all) {
                if ((opt->hop && np->rxopt.bits.hopopts) ||
@@ -1214,7 +1213,7 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
 #ifdef CONFIG_ACCEPT_QUEUES
         if (tcp_acceptq_is_full(sk, class) && tcp_synq_young(sk, class) > 1)
 #else
-       if (tcp_acceptq_is_full(sk) && tcp_synq_young(sk) > 1)
+       if (sk_acceptq_is_full(sk) && tcp_synq_young(sk) > 1)
 #endif
                goto drop;
 
@@ -1339,13 +1338,13 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
 #ifdef CONFIG_ACCEPT_QUEUES
        if (tcp_acceptq_is_full(sk, req->acceptq_class))
 #else
-       if (tcp_acceptq_is_full(sk))
+       if (sk_acceptq_is_full(sk))
 #endif
                goto out_overflow;
 
        if (np->rxopt.bits.srcrt == 2 &&
            opt == NULL && req->af.v6_req.pktopts) {
-               struct inet6_skb_parm *rxopt = (struct inet6_skb_parm *)req->af.v6_req.pktopts->cb;
+               struct inet6_skb_parm *rxopt = IP6CB(req->af.v6_req.pktopts);
                if (rxopt->srcrt)
                        opt = ipv6_invert_rthdr(sk, (struct ipv6_rt_hdr*)(req->af.v6_req.pktopts->nh.raw+rxopt->srcrt));
        }
@@ -1919,7 +1918,7 @@ static int tcp_v6_init_sock(struct sock *sk)
 
        tp->af_specific = &ipv6_specific;
 
-       sk->sk_write_space = tcp_write_space;
+       sk->sk_write_space = sk_stream_write_space;
        sk->sk_use_write_queue = 1;
 
        sk->sk_sndbuf = sysctl_tcp_wmem[1];