diff options
| -rw-r--r-- | net/xfrm/xfrm_user.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 983b0233767b..c2cfcc6fdb34 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c | |||
| @@ -1445,6 +1445,21 @@ static int validate_tmpl(int nr, struct xfrm_user_tmpl *ut, u16 family) | |||
| 1445 | default: | 1445 | default: |
| 1446 | return -EINVAL; | 1446 | return -EINVAL; |
| 1447 | } | 1447 | } |
| 1448 | |||
| 1449 | switch (ut[i].id.proto) { | ||
| 1450 | case IPPROTO_AH: | ||
| 1451 | case IPPROTO_ESP: | ||
| 1452 | case IPPROTO_COMP: | ||
| 1453 | #if IS_ENABLED(CONFIG_IPV6) | ||
| 1454 | case IPPROTO_ROUTING: | ||
| 1455 | case IPPROTO_DSTOPTS: | ||
| 1456 | #endif | ||
| 1457 | case IPSEC_PROTO_ANY: | ||
| 1458 | break; | ||
| 1459 | default: | ||
| 1460 | return -EINVAL; | ||
| 1461 | } | ||
| 1462 | |||
| 1448 | } | 1463 | } |
| 1449 | 1464 | ||
| 1450 | return 0; | 1465 | return 0; |
