diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-19 21:55:56 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-19 21:55:56 -0400 |
| commit | d0b952a9837f81cd89e756b1b34293fa6e1cb59d (patch) | |
| tree | fbe488bc5f407afa0e91cefb262d9e9ee69062ac /net/ipv6/xfrm6_input.c | |
| parent | d90125bfe958ed0451c6b98f831c86aba08b43d5 (diff) | |
| parent | 47552c4e555eefe381f3d45140b59a2ea4b16486 (diff) | |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (109 commits)
[ETHTOOL]: Fix UFO typo
[SCTP]: Fix persistent slowdown in sctp when a gap ack consumes rx buffer.
[SCTP]: Send only 1 window update SACK per message.
[SCTP]: Don't do CRC32C checksum over loopback.
[SCTP] Reset rtt_in_progress for the chunk when processing its sack.
[SCTP]: Reject sctp packets with broadcast addresses.
[SCTP]: Limit association max_retrans setting in setsockopt.
[PFKEYV2]: Fix inconsistent typing in struct sadb_x_kmprivate.
[IPV6]: Sum real space for RTAs.
[IRDA]: Use put_unaligned() in irlmp_do_discovery().
[BRIDGE]: Add support for NETIF_F_HW_CSUM devices
[NET]: Add NETIF_F_GEN_CSUM and NETIF_F_ALL_CSUM
[TG3]: Convert to non-LLTX
[TG3]: Remove unnecessary tx_lock
[TCP]: Add tcp_slow_start_after_idle sysctl.
[BNX2]: Update version and reldate
[BNX2]: Use CPU native page size
[BNX2]: Use compressed firmware
[BNX2]: Add firmware decompression
[BNX2]: Allow WoL settings on new 5708 chips
...
Manual fixup for conflict in drivers/net/tulip/winbond-840.c
Diffstat (limited to 'net/ipv6/xfrm6_input.c')
| -rw-r--r-- | net/ipv6/xfrm6_input.c | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/net/ipv6/xfrm6_input.c b/net/ipv6/xfrm6_input.c index 00cfdee18dca..0405d74ff910 100644 --- a/net/ipv6/xfrm6_input.c +++ b/net/ipv6/xfrm6_input.c | |||
| @@ -13,21 +13,9 @@ | |||
| 13 | #include <linux/string.h> | 13 | #include <linux/string.h> |
| 14 | #include <linux/netfilter.h> | 14 | #include <linux/netfilter.h> |
| 15 | #include <linux/netfilter_ipv6.h> | 15 | #include <linux/netfilter_ipv6.h> |
| 16 | #include <net/dsfield.h> | ||
| 17 | #include <net/inet_ecn.h> | ||
| 18 | #include <net/ip.h> | ||
| 19 | #include <net/ipv6.h> | 16 | #include <net/ipv6.h> |
| 20 | #include <net/xfrm.h> | 17 | #include <net/xfrm.h> |
| 21 | 18 | ||
| 22 | static inline void ipip6_ecn_decapsulate(struct sk_buff *skb) | ||
| 23 | { | ||
| 24 | struct ipv6hdr *outer_iph = skb->nh.ipv6h; | ||
| 25 | struct ipv6hdr *inner_iph = skb->h.ipv6h; | ||
| 26 | |||
| 27 | if (INET_ECN_is_ce(ipv6_get_dsfield(outer_iph))) | ||
| 28 | IP6_ECN_set_ce(inner_iph); | ||
| 29 | } | ||
| 30 | |||
| 31 | int xfrm6_rcv_spi(struct sk_buff *skb, u32 spi) | 19 | int xfrm6_rcv_spi(struct sk_buff *skb, u32 spi) |
| 32 | { | 20 | { |
| 33 | int err; | 21 | int err; |
| @@ -81,21 +69,10 @@ int xfrm6_rcv_spi(struct sk_buff *skb, u32 spi) | |||
| 81 | 69 | ||
| 82 | xfrm_vec[xfrm_nr++] = x; | 70 | xfrm_vec[xfrm_nr++] = x; |
| 83 | 71 | ||
| 72 | if (x->mode->input(x, skb)) | ||
| 73 | goto drop; | ||
| 74 | |||
| 84 | if (x->props.mode) { /* XXX */ | 75 | if (x->props.mode) { /* XXX */ |
| 85 | if (nexthdr != IPPROTO_IPV6) | ||
| 86 | goto drop; | ||
| 87 | if (!pskb_may_pull(skb, sizeof(struct ipv6hdr))) | ||
| 88 | goto drop; | ||
| 89 | if (skb_cloned(skb) && | ||
| 90 | pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) | ||
| 91 | goto drop; | ||
| 92 | if (x->props.flags & XFRM_STATE_DECAP_DSCP) | ||
| 93 | ipv6_copy_dscp(skb->nh.ipv6h, skb->h.ipv6h); | ||
| 94 | if (!(x->props.flags & XFRM_STATE_NOECN)) | ||
| 95 | ipip6_ecn_decapsulate(skb); | ||
| 96 | skb->mac.raw = memmove(skb->data - skb->mac_len, | ||
| 97 | skb->mac.raw, skb->mac_len); | ||
| 98 | skb->nh.raw = skb->data; | ||
| 99 | decaps = 1; | 76 | decaps = 1; |
| 100 | break; | 77 | break; |
| 101 | } | 78 | } |
