diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 15:49:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 15:49:40 -0500 |
commit | 0191b625ca5a46206d2fb862bb08f36f2fcb3b31 (patch) | |
tree | 454d1842b1833d976da62abcbd5c47521ebe9bd7 /net/ipv6/icmp.c | |
parent | 54a696bd07c14d3b1192d03ce7269bc59b45209a (diff) | |
parent | eb56092fc168bf5af199d47af50c0d84a96db898 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1429 commits)
net: Allow dependancies of FDDI & Tokenring to be modular.
igb: Fix build warning when DCA is disabled.
net: Fix warning fallout from recent NAPI interface changes.
gro: Fix potential use after free
sfc: If AN is enabled, always read speed/duplex from the AN advertising bits
sfc: When disabling the NIC, close the device rather than unregistering it
sfc: SFT9001: Add cable diagnostics
sfc: Add support for multiple PHY self-tests
sfc: Merge top-level functions for self-tests
sfc: Clean up PHY mode management in loopback self-test
sfc: Fix unreliable link detection in some loopback modes
sfc: Generate unique names for per-NIC workqueues
802.3ad: use standard ethhdr instead of ad_header
802.3ad: generalize out mac address initializer
802.3ad: initialize ports LACPDU from const initializer
802.3ad: remove typedef around ad_system
802.3ad: turn ports is_individual into a bool
802.3ad: turn ports is_enabled into a bool
802.3ad: make ntt bool
ixgbe: Fix set_ringparam in ixgbe to use the same memory pools.
...
Fixed trivial IPv4/6 address printing conflicts in fs/cifs/connect.c due
to the conversion to %pI (in this networking merge) and the addition of
doing IPv6 addresses (from the earlier merge of CIFS).
Diffstat (limited to 'net/ipv6/icmp.c')
-rw-r--r-- | net/ipv6/icmp.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 9b7d19ae5ced..4f433847d95f 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
@@ -233,7 +233,7 @@ static int icmpv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct | |||
233 | icmp6h->icmp6_cksum = 0; | 233 | icmp6h->icmp6_cksum = 0; |
234 | 234 | ||
235 | if (skb_queue_len(&sk->sk_write_queue) == 1) { | 235 | if (skb_queue_len(&sk->sk_write_queue) == 1) { |
236 | skb->csum = csum_partial((char *)icmp6h, | 236 | skb->csum = csum_partial(icmp6h, |
237 | sizeof(struct icmp6hdr), skb->csum); | 237 | sizeof(struct icmp6hdr), skb->csum); |
238 | icmp6h->icmp6_cksum = csum_ipv6_magic(&fl->fl6_src, | 238 | icmp6h->icmp6_cksum = csum_ipv6_magic(&fl->fl6_src, |
239 | &fl->fl6_dst, | 239 | &fl->fl6_dst, |
@@ -246,7 +246,7 @@ static int icmpv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct | |||
246 | tmp_csum = csum_add(tmp_csum, skb->csum); | 246 | tmp_csum = csum_add(tmp_csum, skb->csum); |
247 | } | 247 | } |
248 | 248 | ||
249 | tmp_csum = csum_partial((char *)icmp6h, | 249 | tmp_csum = csum_partial(icmp6h, |
250 | sizeof(struct icmp6hdr), tmp_csum); | 250 | sizeof(struct icmp6hdr), tmp_csum); |
251 | icmp6h->icmp6_cksum = csum_ipv6_magic(&fl->fl6_src, | 251 | icmp6h->icmp6_cksum = csum_ipv6_magic(&fl->fl6_src, |
252 | &fl->fl6_dst, | 252 | &fl->fl6_dst, |
@@ -427,7 +427,7 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, | |||
427 | /* No need to clone since we're just using its address. */ | 427 | /* No need to clone since we're just using its address. */ |
428 | dst2 = dst; | 428 | dst2 = dst; |
429 | 429 | ||
430 | err = xfrm_lookup(&dst, &fl, sk, 0); | 430 | err = xfrm_lookup(net, &dst, &fl, sk, 0); |
431 | switch (err) { | 431 | switch (err) { |
432 | case 0: | 432 | case 0: |
433 | if (dst != dst2) | 433 | if (dst != dst2) |
@@ -446,7 +446,7 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, | |||
446 | if (ip6_dst_lookup(sk, &dst2, &fl)) | 446 | if (ip6_dst_lookup(sk, &dst2, &fl)) |
447 | goto relookup_failed; | 447 | goto relookup_failed; |
448 | 448 | ||
449 | err = xfrm_lookup(&dst2, &fl, sk, XFRM_LOOKUP_ICMP); | 449 | err = xfrm_lookup(net, &dst2, &fl, sk, XFRM_LOOKUP_ICMP); |
450 | switch (err) { | 450 | switch (err) { |
451 | case 0: | 451 | case 0: |
452 | dst_release(dst); | 452 | dst_release(dst); |
@@ -552,7 +552,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb) | |||
552 | err = ip6_dst_lookup(sk, &dst, &fl); | 552 | err = ip6_dst_lookup(sk, &dst, &fl); |
553 | if (err) | 553 | if (err) |
554 | goto out; | 554 | goto out; |
555 | if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) | 555 | if ((err = xfrm_lookup(net, &dst, &fl, sk, 0)) < 0) |
556 | goto out; | 556 | goto out; |
557 | 557 | ||
558 | if (ipv6_addr_is_multicast(&fl.fl6_dst)) | 558 | if (ipv6_addr_is_multicast(&fl.fl6_dst)) |
@@ -646,9 +646,10 @@ static int icmpv6_rcv(struct sk_buff *skb) | |||
646 | int type; | 646 | int type; |
647 | 647 | ||
648 | if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) { | 648 | if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) { |
649 | struct sec_path *sp = skb_sec_path(skb); | ||
649 | int nh; | 650 | int nh; |
650 | 651 | ||
651 | if (!(skb->sp && skb->sp->xvec[skb->sp->len - 1]->props.flags & | 652 | if (!(sp && sp->xvec[sp->len - 1]->props.flags & |
652 | XFRM_STATE_ICMP)) | 653 | XFRM_STATE_ICMP)) |
653 | goto drop_no_count; | 654 | goto drop_no_count; |
654 | 655 | ||
@@ -680,8 +681,8 @@ static int icmpv6_rcv(struct sk_buff *skb) | |||
680 | skb->csum = ~csum_unfold(csum_ipv6_magic(saddr, daddr, skb->len, | 681 | skb->csum = ~csum_unfold(csum_ipv6_magic(saddr, daddr, skb->len, |
681 | IPPROTO_ICMPV6, 0)); | 682 | IPPROTO_ICMPV6, 0)); |
682 | if (__skb_checksum_complete(skb)) { | 683 | if (__skb_checksum_complete(skb)) { |
683 | LIMIT_NETDEBUG(KERN_DEBUG "ICMPv6 checksum failed [" NIP6_FMT " > " NIP6_FMT "]\n", | 684 | LIMIT_NETDEBUG(KERN_DEBUG "ICMPv6 checksum failed [%pI6 > %pI6]\n", |
684 | NIP6(*saddr), NIP6(*daddr)); | 685 | saddr, daddr); |
685 | goto discard_it; | 686 | goto discard_it; |
686 | } | 687 | } |
687 | } | 688 | } |
@@ -955,8 +956,8 @@ ctl_table ipv6_icmp_table_template[] = { | |||
955 | .data = &init_net.ipv6.sysctl.icmpv6_time, | 956 | .data = &init_net.ipv6.sysctl.icmpv6_time, |
956 | .maxlen = sizeof(int), | 957 | .maxlen = sizeof(int), |
957 | .mode = 0644, | 958 | .mode = 0644, |
958 | .proc_handler = &proc_dointvec_ms_jiffies, | 959 | .proc_handler = proc_dointvec_ms_jiffies, |
959 | .strategy = &sysctl_ms_jiffies | 960 | .strategy = sysctl_ms_jiffies |
960 | }, | 961 | }, |
961 | { .ctl_name = 0 }, | 962 | { .ctl_name = 0 }, |
962 | }; | 963 | }; |