Be less verbose when deleting SAs triggered by a hard expire
This commit is contained in:
@@ -1737,30 +1737,27 @@ METHOD(kernel_ipsec_t, del_sa, status_t,
|
|||||||
mrk->m = mark.mask;
|
mrk->m = mark.mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->socket_xfrm->send_ack(this->socket_xfrm, hdr) != SUCCESS)
|
switch (this->socket_xfrm->send_ack(this->socket_xfrm, hdr))
|
||||||
{
|
{
|
||||||
if (mark.value)
|
case SUCCESS:
|
||||||
{
|
DBG2(DBG_KNL, "deleted SAD entry with SPI %.8x (mark %u/0x%08x)",
|
||||||
DBG1(DBG_KNL, "unable to delete SAD entry with SPI %.8x "
|
ntohl(spi), mark.value, mark.mask);
|
||||||
"(mark %u/0x%8x)", ntohl(spi), mark.value, mark.mask);
|
return SUCCESS;
|
||||||
}
|
case NOT_FOUND:
|
||||||
else
|
return NOT_FOUND;
|
||||||
{
|
default:
|
||||||
DBG1(DBG_KNL, "unable to delete SAD entry with SPI %.8x",
|
if (mark.value)
|
||||||
ntohl(spi));
|
{
|
||||||
}
|
DBG1(DBG_KNL, "unable to delete SAD entry with SPI %.8x "
|
||||||
return FAILED;
|
"(mark %u/0x%8x)", ntohl(spi), mark.value, mark.mask);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DBG1(DBG_KNL, "unable to delete SAD entry with SPI %.8x",
|
||||||
|
ntohl(spi));
|
||||||
|
}
|
||||||
|
return FAILED;
|
||||||
}
|
}
|
||||||
if (mark.value)
|
|
||||||
{
|
|
||||||
DBG2(DBG_KNL, "deleted SAD entry with SPI %.8x (mark %u/0x%8x)",
|
|
||||||
ntohl(spi), mark.value, mark.mask);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DBG2(DBG_KNL, "deleted SAD entry with SPI %.8x", ntohl(spi));
|
|
||||||
}
|
|
||||||
return SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
METHOD(kernel_ipsec_t, update_sa, status_t,
|
METHOD(kernel_ipsec_t, update_sa, status_t,
|
||||||
|
|||||||
@@ -206,6 +206,11 @@ METHOD(netlink_socket_t, netlink_send_ack, status_t,
|
|||||||
free(out);
|
free(out);
|
||||||
return ALREADY_DONE;
|
return ALREADY_DONE;
|
||||||
}
|
}
|
||||||
|
if (-err->error == ESRCH)
|
||||||
|
{ /* do not report missing entries */
|
||||||
|
free(out);
|
||||||
|
return NOT_FOUND;
|
||||||
|
}
|
||||||
DBG1(DBG_KNL, "received netlink error: %s (%d)",
|
DBG1(DBG_KNL, "received netlink error: %s (%d)",
|
||||||
strerror(-err->error), -err->error);
|
strerror(-err->error), -err->error);
|
||||||
free(out);
|
free(out);
|
||||||
|
|||||||
Reference in New Issue
Block a user