diff options
Diffstat (limited to 'net/key/af_key.c')
-rw-r--r-- | net/key/af_key.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c index 9d585370c5b4..911ef03bf8fb 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c | |||
@@ -1098,7 +1098,8 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct net *net, | |||
1098 | 1098 | ||
1099 | x->id.proto = proto; | 1099 | x->id.proto = proto; |
1100 | x->id.spi = sa->sadb_sa_spi; | 1100 | x->id.spi = sa->sadb_sa_spi; |
1101 | x->props.replay_window = sa->sadb_sa_replay; | 1101 | x->props.replay_window = min_t(unsigned int, sa->sadb_sa_replay, |
1102 | (sizeof(x->replay.bitmap) * 8)); | ||
1102 | if (sa->sadb_sa_flags & SADB_SAFLAGS_NOECN) | 1103 | if (sa->sadb_sa_flags & SADB_SAFLAGS_NOECN) |
1103 | x->props.flags |= XFRM_STATE_NOECN; | 1104 | x->props.flags |= XFRM_STATE_NOECN; |
1104 | if (sa->sadb_sa_flags & SADB_SAFLAGS_DECAP_DSCP) | 1105 | if (sa->sadb_sa_flags & SADB_SAFLAGS_DECAP_DSCP) |