updown: Get value for PLUTO_MARK_{IN,OUT} from CHILD_SA
Or the invoked script will get a broken value when `mark=%unique` is used in a configuration. Closes strongswan/strongswan#37.
This commit is contained in:
committed by
Tobias Brunner
parent
b39be996cc
commit
b210369314
@@ -344,13 +344,13 @@ static void invoke_once(private_updown_listener_t *this, ike_sa_t *ike_sa,
|
|||||||
}
|
}
|
||||||
push_vip_env(this, ike_sa, envp, countof(envp), TRUE);
|
push_vip_env(this, ike_sa, envp, countof(envp), TRUE);
|
||||||
push_vip_env(this, ike_sa, envp, countof(envp), FALSE);
|
push_vip_env(this, ike_sa, envp, countof(envp), FALSE);
|
||||||
mark = config->get_mark(config, TRUE);
|
mark = child_sa->get_mark(child_sa, TRUE);
|
||||||
if (mark.value)
|
if (mark.value)
|
||||||
{
|
{
|
||||||
push_env(envp, countof(envp), "PLUTO_MARK_IN=%u/0x%08x",
|
push_env(envp, countof(envp), "PLUTO_MARK_IN=%u/0x%08x",
|
||||||
mark.value, mark.mask);
|
mark.value, mark.mask);
|
||||||
}
|
}
|
||||||
mark = config->get_mark(config, FALSE);
|
mark = child_sa->get_mark(child_sa, FALSE);
|
||||||
if (mark.value)
|
if (mark.value)
|
||||||
{
|
{
|
||||||
push_env(envp, countof(envp), "PLUTO_MARK_OUT=%u/0x%08x",
|
push_env(envp, countof(envp), "PLUTO_MARK_OUT=%u/0x%08x",
|
||||||
|
|||||||
Reference in New Issue
Block a user