projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[INET]: style updates for the inet_sock->is_icsk assignment fix
[powerpc.git]
/
net
/
ipv6
/
raw.c
diff --git
a/net/ipv6/raw.c
b/net/ipv6/raw.c
index
d6dedc4
..
4ae1b19
100644
(file)
--- a/
net/ipv6/raw.c
+++ b/
net/ipv6/raw.c
@@
-220,7
+220,7
@@
static int rawv6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct sockaddr_in6 *addr = (struct sockaddr_in6 *) uaddr;
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct sockaddr_in6 *addr = (struct sockaddr_in6 *) uaddr;
- __
u
32 v4addr = 0;
+ __
be
32 v4addr = 0;
int addr_type;
int err;
int addr_type;
int err;
@@
-290,7
+290,7
@@
out:
void rawv6_err(struct sock *sk, struct sk_buff *skb,
struct inet6_skb_parm *opt,
void rawv6_err(struct sock *sk, struct sk_buff *skb,
struct inet6_skb_parm *opt,
- int type, int code, int offset,
u
32 info)
+ int type, int code, int offset,
__be
32 info)
{
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
{
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
@@
-370,9
+370,9
@@
int rawv6_rcv(struct sock *sk, struct sk_buff *skb)
skb->ip_summed = CHECKSUM_UNNECESSARY;
}
if (skb->ip_summed != CHECKSUM_UNNECESSARY)
skb->ip_summed = CHECKSUM_UNNECESSARY;
}
if (skb->ip_summed != CHECKSUM_UNNECESSARY)
- skb->csum = ~csum_ipv6_magic(&skb->nh.ipv6h->saddr,
+ skb->csum = ~csum_
unfold(csum_
ipv6_magic(&skb->nh.ipv6h->saddr,
&skb->nh.ipv6h->daddr,
&skb->nh.ipv6h->daddr,
- skb->len, inet->num, 0);
+ skb->len, inet->num, 0)
)
;
if (inet->hdrincl) {
if (skb_checksum_complete(skb)) {
if (inet->hdrincl) {
if (skb_checksum_complete(skb)) {
@@
-479,8
+479,8
@@
static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl,
int offset;
int len;
int total_len;
int offset;
int len;
int total_len;
-
u32
tmp_csum;
-
u
16 csum;
+
__wsum
tmp_csum;
+
__sum
16 csum;
if (!rp->checksum)
goto send;
if (!rp->checksum)
goto send;
@@
-530,16
+530,15
@@
static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl,
/* in case cksum was not initialized */
if (unlikely(csum))
/* in case cksum was not initialized */
if (unlikely(csum))
- tmp_csum = csum_sub(tmp_csum, csum);
+ tmp_csum = csum_sub(tmp_csum, csum
_unfold(csum)
);
-
tmp_
csum = csum_ipv6_magic(&fl->fl6_src,
+ csum = csum_ipv6_magic(&fl->fl6_src,
&fl->fl6_dst,
total_len, fl->proto, tmp_csum);
&fl->fl6_dst,
total_len, fl->proto, tmp_csum);
- if (
tmp_csum == 0
)
-
tmp_csum = -1
;
+ if (
csum == 0 && fl->proto == IPPROTO_UDP
)
+
csum = CSUM_MANGLED_0
;
- csum = tmp_csum;
if (skb_store_bits(skb, offset, &csum, 2))
BUG();
if (skb_store_bits(skb, offset, &csum, 2))
BUG();
@@
-586,7
+585,7
@@
static int rawv6_send_hdrinc(struct sock *sk, void *from, int length,
if (err)
goto error_fault;
if (err)
goto error_fault;
- IP6_INC_STATS(
IPSTATS_MIB_OUTREQUESTS);
+ IP6_INC_STATS(
rt->rt6i_idev, IPSTATS_MIB_OUTREQUESTS);
err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, rt->u.dst.dev,
dst_output);
if (err > 0)
err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, rt->u.dst.dev,
dst_output);
if (err > 0)
@@
-600,7
+599,7
@@
error_fault:
err = -EFAULT;
kfree_skb(skb);
error:
err = -EFAULT;
kfree_skb(skb);
error:
- IP6_INC_STATS(IPSTATS_MIB_OUTDISCARDS);
+ IP6_INC_STATS(
rt->rt6i_idev,
IPSTATS_MIB_OUTDISCARDS);
return err;
}
return err;
}
@@
-855,7
+854,8
@@
back_from_confirm:
}
done:
dst_release(dst);
}
done:
dst_release(dst);
- release_sock(sk);
+ if (!inet->hdrincl)
+ release_sock(sk);
out:
fl6_sock_release(flowlabel);
return err<0?err:len;
out:
fl6_sock_release(flowlabel);
return err<0?err:len;