kernel-pfroute: Don't report an error when trying to reinstall a route

This commit is contained in:
Tobias Brunner 2013-07-10 12:38:21 +02:00
parent 8afd0f05e3
commit 527663d6b6
1 changed files with 4 additions and 0 deletions

View File

@ -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;