child-cfg: Use flags for boolean options
Makes it potentially easier to add new flags.
This commit is contained in:
@@ -1071,15 +1071,15 @@ static child_cfg_t *build_child_cfg(private_stroke_config_t *this,
|
||||
},
|
||||
.reqid = msg->add_conn.reqid,
|
||||
.mode = msg->add_conn.mode,
|
||||
.proxy_mode = msg->add_conn.proxy_mode,
|
||||
.ipcomp = msg->add_conn.ipcomp,
|
||||
.options = (msg->add_conn.proxy_mode ? OPT_PROXY_MODE : 0) |
|
||||
(msg->add_conn.ipcomp ? OPT_IPCOMP : 0) |
|
||||
(msg->add_conn.me.hostaccess ? OPT_HOSTACCESS : 0) |
|
||||
(msg->add_conn.install_policy ? 0 : OPT_NO_POLICIES),
|
||||
.tfc = msg->add_conn.tfc,
|
||||
.inactivity = msg->add_conn.inactivity,
|
||||
.dpd_action = map_action(msg->add_conn.dpd.action),
|
||||
.close_action = map_action(msg->add_conn.close_action),
|
||||
.updown = msg->add_conn.me.updown,
|
||||
.hostaccess = msg->add_conn.me.hostaccess,
|
||||
.suppress_policies = !msg->add_conn.install_policy,
|
||||
};
|
||||
|
||||
child_cfg = child_cfg_create(msg->add_conn.name, &child);
|
||||
|
||||
@@ -218,7 +218,7 @@ static void log_child_sa(FILE *out, child_sa_t *child_sa, bool all)
|
||||
child_sa->get_name(child_sa), child_sa->get_unique_id(child_sa),
|
||||
child_sa_state_names, child_sa->get_state(child_sa),
|
||||
ipsec_mode_names, child_sa->get_mode(child_sa),
|
||||
config->use_proxy_mode(config) ? "_PROXY" : "",
|
||||
config->has_option(config, OPT_PROXY_MODE) ? "_PROXY" : "",
|
||||
child_sa->get_reqid(child_sa));
|
||||
|
||||
if (child_sa->get_state(child_sa) == CHILD_INSTALLED)
|
||||
|
||||
Reference in New Issue
Block a user