aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins/unity/unity_narrow.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2012-07-24 12:20:32 +0200
committerMartin Willi <martin@revosec.ch>2012-09-18 17:17:47 +0200
commite39e6974297e7031bd2f9fc2ecc0abb94b3caa87 (patch)
tree699ccb240d10d9fd86203434bc7a513c65135aa9 /src/libcharon/plugins/unity/unity_narrow.c
parent92b5066705929b4dfdba0ecae20df3d9f83fa3a1 (diff)
downloadstrongswan-e39e6974297e7031bd2f9fc2ecc0abb94b3caa87.tar.bz2
strongswan-e39e6974297e7031bd2f9fc2ecc0abb94b3caa87.tar.xz
Check if subset calculation actually yields a TS in Unity narrowing
Diffstat (limited to 'src/libcharon/plugins/unity/unity_narrow.c')
-rw-r--r--src/libcharon/plugins/unity/unity_narrow.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libcharon/plugins/unity/unity_narrow.c b/src/libcharon/plugins/unity/unity_narrow.c
index dada26dc6..a5fcfabc7 100644
--- a/src/libcharon/plugins/unity/unity_narrow.c
+++ b/src/libcharon/plugins/unity/unity_narrow.c
@@ -53,7 +53,11 @@ METHOD(listener_t, narrow, bool,
{ /* got one, replace original TS */
remote->remove_first(remote, (void**)&orig);
}
- remote->insert_last(remote, orig->get_subset(orig, current));
+ current = orig->get_subset(orig, current);
+ if (current)
+ {
+ remote->insert_last(remote, current);
+ }
}
enumerator->destroy(enumerator);
if (orig)