]> err.no Git - linux-2.6/blobdiff - net/dccp/ipv6.c
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/ into merge_linus
[linux-2.6] / net / dccp / ipv6.c
index fc326173c21507dbfcbabee34fa91f39f66c6db1..c7aaa2574f52d3036f28dcb8ba896e914800406b 100644 (file)
@@ -59,7 +59,7 @@ static void dccp_v6_hash(struct sock *sk)
 }
 
 /* add pseudo-header to DCCP checksum stored in skb->csum */
-static inline u16 dccp_v6_csum_finish(struct sk_buff *skb,
+static inline __sum16 dccp_v6_csum_finish(struct sk_buff *skb,
                                      struct in6_addr *saddr,
                                      struct in6_addr *daddr)
 {
@@ -76,8 +76,8 @@ static inline void dccp_v6_send_check(struct sock *sk, int unused_value,
        dh->dccph_checksum = dccp_v6_csum_finish(skb, &np->saddr, &np->daddr);
 }
 
-static inline __u32 secure_dccpv6_sequence_number(__u32 *saddr, __u32 *daddr,
-                                                 __u16 sport, __u16 dport   )
+static inline __u32 secure_dccpv6_sequence_number(__be32 *saddr, __be32 *daddr,
+                                                 __be16 sport, __be16 dport   )
 {
        return secure_tcpv6_sequence_number(saddr, daddr, sport, dport);
 }
@@ -310,7 +310,7 @@ static void dccp_v6_reqsk_destructor(struct request_sock *req)
                kfree_skb(inet6_rsk(req)->pktopts);
 }
 
-static void dccp_v6_ctl_send_reset(struct sk_buff *rxskb)
+static void dccp_v6_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb)
 {
        struct dccp_hdr *rxdh = dccp_hdr(rxskb), *dh;
        const u32 dccp_hdr_reset_len = sizeof(struct dccp_hdr) +
@@ -805,7 +805,7 @@ static int dccp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
        return 0;
 
 reset:
-       dccp_v6_ctl_send_reset(skb);
+       dccp_v6_ctl_send_reset(sk, skb);
 discard:
        if (opt_skb != NULL)
                __kfree_skb(opt_skb);
@@ -828,9 +828,7 @@ static int dccp_v6_rcv(struct sk_buff **pskb)
        /* Step 1: If header checksum is incorrect, drop packet and return. */
        if (dccp_v6_csum_finish(skb, &skb->nh.ipv6h->saddr,
                                     &skb->nh.ipv6h->daddr)) {
-               LIMIT_NETDEBUG(KERN_WARNING
-                              "%s: dropped packet with invalid checksum\n",
-                              __FUNCTION__);
+               DCCP_WARN("dropped packet with invalid checksum\n");
                goto discard_it;
        }
 
@@ -888,7 +886,7 @@ static int dccp_v6_rcv(struct sk_buff **pskb)
        if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb))
                goto discard_and_relse;
 
-       return sk_receive_skb(sk, skb) ? -1 : 0;
+       return sk_receive_skb(sk, skb, 1) ? -1 : 0;
 
 no_dccp_socket:
        if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb))
@@ -902,7 +900,7 @@ no_dccp_socket:
        if (dh->dccph_type != DCCP_PKT_RESET) {
                DCCP_SKB_CB(skb)->dccpd_reset_code =
                                        DCCP_RESET_CODE_NO_CONNECTION;
-               dccp_v6_ctl_send_reset(skb);
+               dccp_v6_ctl_send_reset(sk, skb);
        }
 
 discard_it: