aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2016-03-09 12:10:12 +0100
committerTobias Brunner <tobias@strongswan.org>2016-03-10 17:26:38 +0100
commit7d22a75b120f56da76b9a05859a6ee045536bea9 (patch)
treef8c55f46f09e8e3e6513cf29d5c49d575535fcad
parentc659d369a0b81c0e723d73964ddf80a79bc1d44e (diff)
downloadstrongswan-7d22a75b120f56da76b9a05859a6ee045536bea9.tar.bz2
strongswan-7d22a75b120f56da76b9a05859a6ee045536bea9.tar.xz
forecast: Compare the complete rules when deleting them
Same as the change in the connmark plugin. References #1229.
-rw-r--r--src/libcharon/plugins/forecast/forecast_listener.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libcharon/plugins/forecast/forecast_listener.c b/src/libcharon/plugins/forecast/forecast_listener.c
index 7e9361752..8f7f2600c 100644
--- a/src/libcharon/plugins/forecast/forecast_listener.c
+++ b/src/libcharon/plugins/forecast/forecast_listener.c
@@ -160,7 +160,10 @@ static bool manage_rule(struct iptc_handle *ipth, const char *chain,
}
else
{
- if (!iptc_delete_entry(chain, e, "", ipth))
+ u_char matchmask[e->next_offset];
+
+ memset(matchmask, 255, sizeof(matchmask));
+ if (!iptc_delete_entry(chain, e, matchmask, ipth))
{
DBG1(DBG_CFG, "deleting %s rule failed: %s",
chain, iptc_strerror(errno));