diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-14 15:28:11 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-14 15:28:11 -0400 |
| commit | 200cfbb36ce360f7943c62b6c09885c215bfc1f5 (patch) | |
| tree | 8f7513bd35225f8681cd7d214d807b7e26211afa /net/xfrm/xfrm_policy.c | |
| parent | 29e0937bb693879221f575b01f26314b3f443322 (diff) | |
| parent | d831666e98b4f1e19ebdd2349735f47bf37cd293 (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:
[IPV4] SNMP: Display new statistics at /proc/net/netstat
[IPV6]: Reverse sense of promisc tests in ip6_mc_input
[NET_SCHED]: prio qdisc boundary condition
[IPSEC]: Don't warn if high-order hash resize fails
[IPSEC]: Check validity of direction in xfrm_policy_byid
Diffstat (limited to 'net/xfrm/xfrm_policy.c')
| -rw-r--r-- | net/xfrm/xfrm_policy.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 95271e8426a1..d0882e53b6fc 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
| @@ -796,6 +796,10 @@ struct xfrm_policy *xfrm_policy_byid(u8 type, int dir, u32 id, int delete, | |||
| 796 | struct hlist_head *chain; | 796 | struct hlist_head *chain; |
| 797 | struct hlist_node *entry; | 797 | struct hlist_node *entry; |
| 798 | 798 | ||
| 799 | *err = -ENOENT; | ||
| 800 | if (xfrm_policy_id2dir(id) != dir) | ||
| 801 | return NULL; | ||
| 802 | |||
| 799 | *err = 0; | 803 | *err = 0; |
| 800 | write_lock_bh(&xfrm_policy_lock); | 804 | write_lock_bh(&xfrm_policy_lock); |
| 801 | chain = xfrm_policy_byidx + idx_hash(id); | 805 | chain = xfrm_policy_byidx + idx_hash(id); |
