Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46954
b: refs/heads/master
c: f48d5ff
h: refs/heads/master
v: v3
  • Loading branch information
Masahide NAKAMURA authored and David S. Miller committed Feb 8, 2007
1 parent 6fa5885 commit a9c1c60
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 29 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cc63f70b8b410eb653449151821f6b8b9af6ca42
refs/heads/master: f48d5ff1e44562a0ee87ce8ea3b798ce9d84370d
26 changes: 0 additions & 26 deletions trunk/net/ipv6/mip6.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ static int mip6_mh_len(int type)
int mip6_mh_filter(struct sock *sk, struct sk_buff *skb)
{
struct ip6_mh *mh;
int mhlen;

if (!pskb_may_pull(skb, (skb->h.raw - skb->data) + 8) ||
!pskb_may_pull(skb, (skb->h.raw - skb->data) + ((skb->h.raw[1] + 1) << 3)))
Expand All @@ -103,31 +102,6 @@ int mip6_mh_filter(struct sock *sk, struct sk_buff *skb)
mip6_param_prob(skb, 0, (&mh->ip6mh_hdrlen) - skb->nh.raw);
return -1;
}
mhlen = (mh->ip6mh_hdrlen + 1) << 3;

if (skb->ip_summed == CHECKSUM_COMPLETE) {
skb->ip_summed = CHECKSUM_UNNECESSARY;
if (csum_ipv6_magic(&skb->nh.ipv6h->saddr,
&skb->nh.ipv6h->daddr,
mhlen, IPPROTO_MH,
skb->csum)) {
LIMIT_NETDEBUG(KERN_DEBUG "mip6: MH hw checksum failed\n");
skb->ip_summed = CHECKSUM_NONE;
}
}
if (skb->ip_summed == CHECKSUM_NONE) {
if (csum_ipv6_magic(&skb->nh.ipv6h->saddr,
&skb->nh.ipv6h->daddr,
mhlen, IPPROTO_MH,
skb_checksum(skb, 0, mhlen, 0))) {
LIMIT_NETDEBUG(KERN_DEBUG "mip6: MH checksum failed "
"[" NIP6_FMT " > " NIP6_FMT "]\n",
NIP6(skb->nh.ipv6h->saddr),
NIP6(skb->nh.ipv6h->daddr));
return -1;
}
skb->ip_summed = CHECKSUM_UNNECESSARY;
}

if (mh->ip6mh_proto != IPPROTO_NONE) {
LIMIT_NETDEBUG(KERN_DEBUG "mip6: MH invalid payload proto = %d\n",
Expand Down
13 changes: 11 additions & 2 deletions trunk/net/ipv6/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1094,10 +1094,19 @@ static void rawv6_close(struct sock *sk, long timeout)

static int rawv6_init_sk(struct sock *sk)
{
if (inet_sk(sk)->num == IPPROTO_ICMPV6) {
struct raw6_sock *rp = raw6_sk(sk);
struct raw6_sock *rp = raw6_sk(sk);

switch (inet_sk(sk)->num) {
case IPPROTO_ICMPV6:
rp->checksum = 1;
rp->offset = 2;
break;
case IPPROTO_MH:
rp->checksum = 1;
rp->offset = 4;
break;
default:
break;
}
return(0);
}
Expand Down

0 comments on commit a9c1c60

Please sign in to comment.