diff options
author | David S. Miller <davem@davemloft.net> | 2019-05-02 22:14:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-02 22:14:21 -0400 |
commit | ff24e4980a68d83090a02fda081741a410fe8eef (patch) | |
tree | 4d874dfcaf2bb8c3abc2446af9447a983402c0ae /net/xfrm/xfrm_user.c | |
parent | 26f146ed971c0e4a264ce525d7a66a71ef73690d (diff) | |
parent | ea9866793d1e925b4d320eaea409263b2a568f38 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Three trivial overlapping conflicts.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm/xfrm_user.c')
-rw-r--r-- | net/xfrm/xfrm_user.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index d7cb16f0df5b..eb8d14389601 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c | |||
@@ -1424,7 +1424,7 @@ static int verify_newpolicy_info(struct xfrm_userpolicy_info *p) | |||
1424 | ret = verify_policy_dir(p->dir); | 1424 | ret = verify_policy_dir(p->dir); |
1425 | if (ret) | 1425 | if (ret) |
1426 | return ret; | 1426 | return ret; |
1427 | if (p->index && ((p->index & XFRM_POLICY_MAX) != p->dir)) | 1427 | if (p->index && (xfrm_policy_id2dir(p->index) != p->dir)) |
1428 | return -EINVAL; | 1428 | return -EINVAL; |
1429 | 1429 | ||
1430 | return 0; | 1430 | return 0; |
@@ -1513,20 +1513,8 @@ static int validate_tmpl(int nr, struct xfrm_user_tmpl *ut, u16 family) | |||
1513 | return -EINVAL; | 1513 | return -EINVAL; |
1514 | } | 1514 | } |
1515 | 1515 | ||
1516 | switch (ut[i].id.proto) { | 1516 | if (!xfrm_id_proto_valid(ut[i].id.proto)) |
1517 | case IPPROTO_AH: | ||
1518 | case IPPROTO_ESP: | ||
1519 | case IPPROTO_COMP: | ||
1520 | #if IS_ENABLED(CONFIG_IPV6) | ||
1521 | case IPPROTO_ROUTING: | ||
1522 | case IPPROTO_DSTOPTS: | ||
1523 | #endif | ||
1524 | case IPSEC_PROTO_ANY: | ||
1525 | break; | ||
1526 | default: | ||
1527 | return -EINVAL; | 1517 | return -EINVAL; |
1528 | } | ||
1529 | |||
1530 | } | 1518 | } |
1531 | 1519 | ||
1532 | return 0; | 1520 | return 0; |