diff options
| author | Jeff Garzik <jeff@garzik.org> | 2006-04-12 16:54:43 -0400 |
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2006-04-12 16:54:43 -0400 |
| commit | a890b15c0990cc8d686edcc85f5fccde71ad5ce9 (patch) | |
| tree | 73162355b58283a2531f13fbbf663809f95c1483 /net/ipv4/xfrm4_input.c | |
| parent | 79fa1b677be3a985cc66b9218a4dd09818f1051b (diff) | |
| parent | 26ec634c31a11a003040e10b4d650495158632fd (diff) | |
Merge branch 'upstream'
Diffstat (limited to 'net/ipv4/xfrm4_input.c')
| -rw-r--r-- | net/ipv4/xfrm4_input.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv4/xfrm4_input.c b/net/ipv4/xfrm4_input.c index e1b8f4b90d80..3e174c83bfe7 100644 --- a/net/ipv4/xfrm4_input.c +++ b/net/ipv4/xfrm4_input.c | |||
| @@ -37,8 +37,6 @@ static int xfrm4_parse_spi(struct sk_buff *skb, u8 nexthdr, u32 *spi, u32 *seq) | |||
| 37 | { | 37 | { |
| 38 | switch (nexthdr) { | 38 | switch (nexthdr) { |
| 39 | case IPPROTO_IPIP: | 39 | case IPPROTO_IPIP: |
| 40 | if (!pskb_may_pull(skb, sizeof(struct iphdr))) | ||
| 41 | return -EINVAL; | ||
| 42 | *spi = skb->nh.iph->saddr; | 40 | *spi = skb->nh.iph->saddr; |
| 43 | *seq = 0; | 41 | *seq = 0; |
| 44 | return 0; | 42 | return 0; |
| @@ -90,7 +88,7 @@ int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type) | |||
| 90 | if (unlikely(x->km.state != XFRM_STATE_VALID)) | 88 | if (unlikely(x->km.state != XFRM_STATE_VALID)) |
| 91 | goto drop_unlock; | 89 | goto drop_unlock; |
| 92 | 90 | ||
| 93 | if (x->encap->encap_type != encap_type) | 91 | if ((x->encap ? x->encap->encap_type : 0) != encap_type) |
| 94 | goto drop_unlock; | 92 | goto drop_unlock; |
| 95 | 93 | ||
| 96 | if (x->props.replay_window && xfrm_replay_check(x, seq)) | 94 | if (x->props.replay_window && xfrm_replay_check(x, seq)) |
