diff options
author | David S. Miller <davem@davemloft.net> | 2011-05-05 23:59:02 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-05 23:59:02 +0200 |
commit | 7143b7d41218d4fc2ea33e6056c73609527ae687 (patch) | |
tree | 9a842daee1deb57a2c8084bc5d300f6d8428fe34 /net/xfrm | |
parent | Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/lin... (diff) | |
parent | can: fix SJA1000 dlc for RTR packets (diff) | |
download | linux-7143b7d41218d4fc2ea33e6056c73609527ae687.tar.xz linux-7143b7d41218d4fc2ea33e6056c73609527ae687.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/tg3.c
Diffstat (limited to 'net/xfrm')
-rw-r--r-- | net/xfrm/xfrm_replay.c | 2 | ||||
-rw-r--r-- | net/xfrm/xfrm_user.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_replay.c b/net/xfrm/xfrm_replay.c index f218385950ca..e8a781422feb 100644 --- a/net/xfrm/xfrm_replay.c +++ b/net/xfrm/xfrm_replay.c @@ -532,7 +532,7 @@ int xfrm_init_replay(struct xfrm_state *x) if (replay_esn) { if (replay_esn->replay_window > - replay_esn->bmp_len * sizeof(__u32)) + replay_esn->bmp_len * sizeof(__u32) * 8) return -EINVAL; if ((x->props.flags & XFRM_STATE_ESN) && x->replay_esn) diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 5d1d60d3ca83..c658cb3bc7c3 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -124,6 +124,9 @@ static inline int verify_replay(struct xfrm_usersa_info *p, { struct nlattr *rt = attrs[XFRMA_REPLAY_ESN_VAL]; + if ((p->flags & XFRM_STATE_ESN) && !rt) + return -EINVAL; + if (!rt) return 0; |