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:
Shota Fukumori 2016-03-13 00:05:01 +09:00 committed by Tobias Brunner
parent b39be996cc
commit b210369314
1 changed files with 2 additions and 2 deletions

View File

@ -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), FALSE);
mark = config->get_mark(config, TRUE);
mark = child_sa->get_mark(child_sa, TRUE);
if (mark.value)
{
push_env(envp, countof(envp), "PLUTO_MARK_IN=%u/0x%08x",
mark.value, mark.mask);
}
mark = config->get_mark(config, FALSE);
mark = child_sa->get_mark(child_sa, FALSE);
if (mark.value)
{
push_env(envp, countof(envp), "PLUTO_MARK_OUT=%u/0x%08x",