Merge "xfrm: validate template mode"
This commit is contained in:
commit
053e6bf3f6
1 changed files with 3 additions and 0 deletions
|
@ -1404,6 +1404,9 @@ static int validate_tmpl(int nr, struct xfrm_user_tmpl *ut, u16 family)
|
|||
(ut[i].family != prev_family))
|
||||
return -EINVAL;
|
||||
|
||||
if (ut[i].mode >= XFRM_MODE_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
prev_family = ut[i].family;
|
||||
|
||||
switch (ut[i].family) {
|
||||
|
|
Loading…
Add table
Reference in a new issue