configuration of different marks for inbound and outbound direction
This commit is contained in:
@@ -291,7 +291,8 @@ static job_requeue_t initiate(private_android_service_t *this)
|
||||
peer_cfg->add_auth_cfg(peer_cfg, auth, FALSE);
|
||||
|
||||
child_cfg = child_cfg_create("android", &lifetime, NULL, TRUE, MODE_TUNNEL,
|
||||
ACTION_NONE, ACTION_NONE, FALSE, 0, 0, NULL);
|
||||
ACTION_NONE, ACTION_NONE, FALSE, 0, 0,
|
||||
NULL, NULL);
|
||||
child_cfg->add_proposal(child_cfg, proposal_create_default(PROTO_ESP));
|
||||
ts = traffic_selector_create_dynamic(0, 0, 65535);
|
||||
child_cfg->add_traffic_selector(child_cfg, TRUE, ts);
|
||||
|
||||
@@ -234,7 +234,8 @@ static void setup_tunnel(private_ha_tunnel_t *this,
|
||||
peer_cfg->add_auth_cfg(peer_cfg, auth_cfg, FALSE);
|
||||
|
||||
child_cfg = child_cfg_create("ha", &lifetime, NULL, TRUE, MODE_TRANSPORT,
|
||||
ACTION_NONE, ACTION_NONE, FALSE, 0, 0, NULL);
|
||||
ACTION_NONE, ACTION_NONE, FALSE, 0, 0,
|
||||
NULL, NULL);
|
||||
ts = traffic_selector_create_dynamic(IPPROTO_UDP, HA_PORT, HA_PORT);
|
||||
child_cfg->add_traffic_selector(child_cfg, TRUE, ts);
|
||||
ts = traffic_selector_create_dynamic(IPPROTO_ICMP, 0, 65535);
|
||||
|
||||
@@ -223,8 +223,9 @@ static peer_cfg_t* generate_config(private_load_tester_config_t *this, uint num)
|
||||
generate_auth_cfg(this, this->initiator_auth, peer_cfg, FALSE, num);
|
||||
}
|
||||
|
||||
child_cfg = child_cfg_create("load-test", &lifetime, NULL, TRUE,
|
||||
MODE_TUNNEL, ACTION_NONE, ACTION_NONE, FALSE, 0, 0, NULL);
|
||||
child_cfg = child_cfg_create("load-test", &lifetime, NULL, TRUE, MODE_TUNNEL,
|
||||
ACTION_NONE, ACTION_NONE, FALSE, 0, 0,
|
||||
NULL, NULL);
|
||||
proposal = proposal_create_from_string(PROTO_ESP, "aes128-sha1");
|
||||
child_cfg->add_proposal(child_cfg, proposal);
|
||||
ts = traffic_selector_create_dynamic(0, 0, 65535);
|
||||
|
||||
@@ -182,7 +182,8 @@ static peer_cfg_t *get_peer_cfg_by_name(private_medcli_config_t *this, char *nam
|
||||
peer_cfg->add_auth_cfg(peer_cfg, auth, FALSE);
|
||||
|
||||
child_cfg = child_cfg_create(name, &lifetime, NULL, TRUE, MODE_TUNNEL,
|
||||
ACTION_NONE, ACTION_NONE, FALSE, 0, 0, NULL);
|
||||
ACTION_NONE, ACTION_NONE, FALSE, 0, 0,
|
||||
NULL, NULL);
|
||||
child_cfg->add_proposal(child_cfg, proposal_create_default(PROTO_ESP));
|
||||
child_cfg->add_traffic_selector(child_cfg, TRUE, ts_from_string(local_net));
|
||||
child_cfg->add_traffic_selector(child_cfg, FALSE, ts_from_string(remote_net));
|
||||
@@ -260,7 +261,8 @@ static bool peer_enumerator_enumerate(peer_enumerator_t *this, peer_cfg_t **cfg)
|
||||
this->current->add_auth_cfg(this->current, auth, FALSE);
|
||||
|
||||
child_cfg = child_cfg_create(name, &lifetime, NULL, TRUE, MODE_TUNNEL,
|
||||
ACTION_NONE, ACTION_NONE, FALSE, 0, 0, NULL);
|
||||
ACTION_NONE, ACTION_NONE, FALSE, 0, 0,
|
||||
NULL, NULL);
|
||||
child_cfg->add_proposal(child_cfg, proposal_create_default(PROTO_ESP));
|
||||
child_cfg->add_traffic_selector(child_cfg, TRUE, ts_from_string(local_net));
|
||||
child_cfg->add_traffic_selector(child_cfg, FALSE, ts_from_string(remote_net));
|
||||
|
||||
@@ -444,7 +444,8 @@ static gboolean connect_(NMVPNPlugin *plugin, NMConnection *connection,
|
||||
|
||||
child_cfg = child_cfg_create(priv->name, &lifetime,
|
||||
NULL, TRUE, MODE_TUNNEL, /* updown, hostaccess */
|
||||
ACTION_NONE, ACTION_NONE, ipcomp, 0, 0, NULL);
|
||||
ACTION_NONE, ACTION_NONE, ipcomp, 0, 0,
|
||||
NULL, NULL);
|
||||
child_cfg->add_proposal(child_cfg, proposal_create_default(PROTO_ESP));
|
||||
ts = traffic_selector_create_dynamic(0, 0, 65535);
|
||||
child_cfg->add_traffic_selector(child_cfg, TRUE, ts);
|
||||
|
||||
@@ -134,7 +134,7 @@ static child_cfg_t *build_child_cfg(private_sql_config_t *this, enumerator_t *e)
|
||||
.time = { .life = lifetime, .rekey = rekeytime, .jitter = jitter }
|
||||
};
|
||||
child_cfg = child_cfg_create(name, &lft, updown, hostaccess, mode,
|
||||
dpd, close, ipcomp, 0, 0, NULL);
|
||||
dpd, close, ipcomp, 0, 0, NULL, NULL);
|
||||
/* TODO: read proposal from db */
|
||||
child_cfg->add_proposal(child_cfg, proposal_create_default(PROTO_ESP));
|
||||
add_traffic_selectors(this, child_cfg, id);
|
||||
|
||||
@@ -768,9 +768,13 @@ static child_cfg_t *build_child_cfg(private_stroke_config_t *this,
|
||||
.jitter = msg->add_conn.rekey.margin_packets * msg->add_conn.rekey.fuzz / 100
|
||||
}
|
||||
};
|
||||
mark_t mark = {
|
||||
.value = msg->add_conn.mark.value,
|
||||
.mask = msg->add_conn.mark.mask
|
||||
mark_t mark_in = {
|
||||
.value = msg->add_conn.mark_in.value,
|
||||
.mask = msg->add_conn.mark_in.mask
|
||||
};
|
||||
mark_t mark_out = {
|
||||
.value = msg->add_conn.mark_out.value,
|
||||
.mask = msg->add_conn.mark_out.mask
|
||||
};
|
||||
|
||||
switch (msg->add_conn.dpd.action)
|
||||
@@ -790,7 +794,8 @@ static child_cfg_t *build_child_cfg(private_stroke_config_t *this,
|
||||
msg->add_conn.name, &lifetime,
|
||||
msg->add_conn.me.updown, msg->add_conn.me.hostaccess,
|
||||
msg->add_conn.mode, dpd, dpd, msg->add_conn.ipcomp,
|
||||
msg->add_conn.inactivity, msg->add_conn.reqid, &mark);
|
||||
msg->add_conn.inactivity, msg->add_conn.reqid,
|
||||
&mark_in, &mark_out);
|
||||
child_cfg->set_mipv6_options(child_cfg, msg->add_conn.proxy_mode,
|
||||
msg->add_conn.install_policy);
|
||||
add_ts(this, &msg->add_conn.me, child_cfg, TRUE);
|
||||
|
||||
@@ -196,7 +196,8 @@ static bool peer_enumerator_enumerate(peer_enumerator_t *this, peer_cfg_t **cfg)
|
||||
this->peer_cfg->add_auth_cfg(this->peer_cfg, auth, FALSE);
|
||||
|
||||
child_cfg = child_cfg_create(name, &lifetime, NULL, TRUE, MODE_TUNNEL,
|
||||
ACTION_NONE, ACTION_NONE, FALSE, 0, 0, NULL);
|
||||
ACTION_NONE, ACTION_NONE, FALSE, 0, 0,
|
||||
NULL, NULL);
|
||||
child_cfg->add_proposal(child_cfg, create_proposal(esp_proposal, PROTO_ESP));
|
||||
child_cfg->add_traffic_selector(child_cfg, TRUE, create_ts(local_net));
|
||||
child_cfg->add_traffic_selector(child_cfg, FALSE, create_ts(remote_net));
|
||||
|
||||
Reference in New Issue
Block a user