diff options
author | tobhe <tobhe@cvs.openbsd.org> | 2020-11-13 21:09:50 +0000 |
---|---|---|
committer | tobhe <tobhe@cvs.openbsd.org> | 2020-11-13 21:09:50 +0000 |
commit | 7bddf27c513b1075c430e6559426b53c8edab947 (patch) | |
tree | 43ebfba43c4000dcbfc89156314880668597376f /sbin/iked | |
parent | c6c1e3b0d0dfd7ed27b8ad98a9fca082ed18a01e (diff) |
addr_net is already checked in ikev2_cp_setaddr() before sessing
sa_addrpool, so we don't need to re-check here.
ok patrick@
Diffstat (limited to 'sbin/iked')
-rw-r--r-- | sbin/iked/ikev2.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sbin/iked/ikev2.c b/sbin/iked/ikev2.c index 7d0ae6cd235..f0f372d51e9 100644 --- a/sbin/iked/ikev2.c +++ b/sbin/iked/ikev2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ikev2.c,v 1.279 2020/11/12 22:19:38 tobhe Exp $ */ +/* $OpenBSD: ikev2.c,v 1.280 2020/11/13 21:09:49 tobhe Exp $ */ /* * Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de> @@ -2248,8 +2248,7 @@ ikev2_add_cp(struct iked *env, struct iked_sa *sa, int type, struct ibuf *buf) case IKEV2_CFG_INTERNAL_IP4_DHCP: case IKEV2_CFG_INTERNAL_IP4_SERVER: /* 4 bytes IPv4 address */ - in4 = (ikecfg->cfg.address.addr_mask != 32 && - (ikecfg->cfg_type == + in4 = ((ikecfg->cfg_type == IKEV2_CFG_INTERNAL_IP4_ADDRESS) && sa->sa_addrpool && sa->sa_addrpool->addr_af == AF_INET) ? @@ -2289,8 +2288,7 @@ ikev2_add_cp(struct iked *env, struct iked_sa *sa, int type, struct ibuf *buf) case IKEV2_CFG_INTERNAL_IP6_ADDRESS: case IKEV2_CFG_INTERNAL_IP6_SUBNET: /* 16 bytes IPv6 address + 1 byte prefix length */ - in6 = (ikecfg->cfg.address.addr_mask != 128 && - (ikecfg->cfg_type == + in6 = ((ikecfg->cfg_type == IKEV2_CFG_INTERNAL_IP6_ADDRESS) && sa->sa_addrpool6 && sa->sa_addrpool6->addr_af == AF_INET6) ? |