aboutsummaryrefslogtreecommitdiffstats
path: root/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2013-07-10 12:38:21 +0200
committerTobias Brunner <tobias@strongswan.org>2013-07-17 17:45:18 +0200
commit527663d6b6f3e9d7ca76869771a758491a5692c2 (patch)
tree10efcc83854fc2ca473e453f313c823fb5735c9f /src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c
parent8afd0f05e34a5443ae2bda631a18b9b0c5a747d4 (diff)
downloadstrongswan-527663d6b6f3e9d7ca76869771a758491a5692c2.tar.bz2
strongswan-527663d6b6f3e9d7ca76869771a758491a5692c2.tar.xz
kernel-pfroute: Don't report an error when trying to reinstall a route
Diffstat (limited to 'src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c')
-rw-r--r--src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c b/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c
index 28802efd8..0760513b8 100644
--- a/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c
+++ b/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c
@@ -1335,6 +1335,10 @@ static status_t manage_route(private_kernel_pfroute_net_t *this, int op,
if (send(this->socket, &msg, msg.hdr.rtm_msglen, 0) != msg.hdr.rtm_msglen)
{
+ if (errno == EEXIST)
+ {
+ return ALREADY_DONE;
+ }
DBG1(DBG_KNL, "%s PF_ROUTE route failed: %s",
op == RTM_ADD ? "adding" : "deleting", strerror(errno));
return FAILED;