diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-08-24 01:02:04 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-24 01:02:04 -0400 |
commit | b2382b363df828f25e35ed8b70a3da33b29b2a64 (patch) | |
tree | 23aa2e70ba4650390c9281b3696172313bdb0f38 /net/ipv6 | |
parent | 1b5cca3a88b7682d538d129c25f0e3092613a243 (diff) | |
parent | 0572e3da3ff5c3744b2f606ecf296d5f89a4bbdf (diff) |
Merge upstream into ieee80211.
Hand-fix merge conflict in drivers/usb/net/zd1201.c.
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/ip6_input.c | 9 | ||||
-rw-r--r-- | net/ipv6/ipcomp6.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6_queue.c | 7 | ||||
-rw-r--r-- | net/ipv6/raw.c | 2 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 9 |
5 files changed, 22 insertions, 7 deletions
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index 866f10726c58..10fbb50daea4 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c | |||
@@ -198,12 +198,13 @@ resubmit: | |||
198 | if (!raw_sk) { | 198 | if (!raw_sk) { |
199 | if (xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) { | 199 | if (xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) { |
200 | IP6_INC_STATS_BH(IPSTATS_MIB_INUNKNOWNPROTOS); | 200 | IP6_INC_STATS_BH(IPSTATS_MIB_INUNKNOWNPROTOS); |
201 | icmpv6_param_prob(skb, ICMPV6_UNK_NEXTHDR, nhoff); | 201 | icmpv6_send(skb, ICMPV6_PARAMPROB, |
202 | ICMPV6_UNK_NEXTHDR, nhoff, | ||
203 | skb->dev); | ||
202 | } | 204 | } |
203 | } else { | 205 | } else |
204 | IP6_INC_STATS_BH(IPSTATS_MIB_INDELIVERS); | 206 | IP6_INC_STATS_BH(IPSTATS_MIB_INDELIVERS); |
205 | kfree_skb(skb); | 207 | kfree_skb(skb); |
206 | } | ||
207 | } | 208 | } |
208 | rcu_read_unlock(); | 209 | rcu_read_unlock(); |
209 | return 0; | 210 | return 0; |
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c index 423feb46ccc0..135383ef538f 100644 --- a/net/ipv6/ipcomp6.c +++ b/net/ipv6/ipcomp6.c | |||
@@ -354,7 +354,7 @@ static struct crypto_tfm **ipcomp6_alloc_tfms(const char *alg_name) | |||
354 | int cpu; | 354 | int cpu; |
355 | 355 | ||
356 | /* This can be any valid CPU ID so we don't need locking. */ | 356 | /* This can be any valid CPU ID so we don't need locking. */ |
357 | cpu = smp_processor_id(); | 357 | cpu = raw_smp_processor_id(); |
358 | 358 | ||
359 | list_for_each_entry(pos, &ipcomp6_tfms_list, list) { | 359 | list_for_each_entry(pos, &ipcomp6_tfms_list, list) { |
360 | struct crypto_tfm *tfm; | 360 | struct crypto_tfm *tfm; |
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c index 5493180f0d44..a16df5b27c84 100644 --- a/net/ipv6/netfilter/ip6_queue.c +++ b/net/ipv6/netfilter/ip6_queue.c | |||
@@ -211,6 +211,12 @@ ipq_build_packet_message(struct ipq_queue_entry *entry, int *errp) | |||
211 | break; | 211 | break; |
212 | 212 | ||
213 | case IPQ_COPY_PACKET: | 213 | case IPQ_COPY_PACKET: |
214 | if (entry->skb->ip_summed == CHECKSUM_HW && | ||
215 | (*errp = skb_checksum_help(entry->skb, | ||
216 | entry->info->outdev == NULL))) { | ||
217 | read_unlock_bh(&queue_lock); | ||
218 | return NULL; | ||
219 | } | ||
214 | if (copy_range == 0 || copy_range > entry->skb->len) | 220 | if (copy_range == 0 || copy_range > entry->skb->len) |
215 | data_len = entry->skb->len; | 221 | data_len = entry->skb->len; |
216 | else | 222 | else |
@@ -381,6 +387,7 @@ ipq_mangle_ipv6(ipq_verdict_msg_t *v, struct ipq_queue_entry *e) | |||
381 | if (!skb_ip_make_writable(&e->skb, v->data_len)) | 387 | if (!skb_ip_make_writable(&e->skb, v->data_len)) |
382 | return -ENOMEM; | 388 | return -ENOMEM; |
383 | memcpy(e->skb->data, v->payload, v->data_len); | 389 | memcpy(e->skb->data, v->payload, v->data_len); |
390 | e->skb->ip_summed = CHECKSUM_NONE; | ||
384 | e->skb->nfcache |= NFC_ALTERED; | 391 | e->skb->nfcache |= NFC_ALTERED; |
385 | 392 | ||
386 | /* | 393 | /* |
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index e2b848ec9851..1d4d75b34d32 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -328,6 +328,8 @@ int rawv6_rcv(struct sock *sk, struct sk_buff *skb) | |||
328 | 328 | ||
329 | if (skb->ip_summed != CHECKSUM_UNNECESSARY) { | 329 | if (skb->ip_summed != CHECKSUM_UNNECESSARY) { |
330 | if (skb->ip_summed == CHECKSUM_HW) { | 330 | if (skb->ip_summed == CHECKSUM_HW) { |
331 | skb_postpull_rcsum(skb, skb->nh.raw, | ||
332 | skb->h.raw - skb->nh.raw); | ||
331 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 333 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
332 | if (csum_ipv6_magic(&skb->nh.ipv6h->saddr, | 334 | if (csum_ipv6_magic(&skb->nh.ipv6h->saddr, |
333 | &skb->nh.ipv6h->daddr, | 335 | &skb->nh.ipv6h->daddr, |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index f6e288dc116e..ef29cfd936d3 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -158,9 +158,14 @@ static int tcp_v6_get_port(struct sock *sk, unsigned short snum) | |||
158 | tcp_port_rover = rover; | 158 | tcp_port_rover = rover; |
159 | spin_unlock(&tcp_portalloc_lock); | 159 | spin_unlock(&tcp_portalloc_lock); |
160 | 160 | ||
161 | /* Exhausted local port range during search? */ | 161 | /* Exhausted local port range during search? It is not |
162 | * possible for us to be holding one of the bind hash | ||
163 | * locks if this test triggers, because if 'remaining' | ||
164 | * drops to zero, we broke out of the do/while loop at | ||
165 | * the top level, not from the 'break;' statement. | ||
166 | */ | ||
162 | ret = 1; | 167 | ret = 1; |
163 | if (remaining <= 0) | 168 | if (unlikely(remaining <= 0)) |
164 | goto fail; | 169 | goto fail; |
165 | 170 | ||
166 | /* OK, here is the one we will use. */ | 171 | /* OK, here is the one we will use. */ |