libipsec: Log a packet's ports and protocol in case of a policy mismatch
This commit is contained in:
@@ -148,9 +148,10 @@ static job_requeue_t process_inbound(private_ipsec_processor_t *this)
|
|||||||
policy->destroy(policy);
|
policy->destroy(policy);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
DBG1(DBG_ESP, "discarding inbound IP packet %H == %H due to "
|
DBG1(DBG_ESP, "discarding inbound IP packet %#H == %#H [%hhu] due "
|
||||||
"policy", ip_packet->get_source(ip_packet),
|
"to policy", ip_packet->get_source(ip_packet),
|
||||||
ip_packet->get_destination(ip_packet));
|
ip_packet->get_destination(ip_packet),
|
||||||
|
ip_packet->get_next_header(ip_packet));
|
||||||
/* no matching policy found, fall-through */
|
/* no matching policy found, fall-through */
|
||||||
}
|
}
|
||||||
case IPPROTO_NONE:
|
case IPPROTO_NONE:
|
||||||
@@ -198,8 +199,9 @@ static job_requeue_t process_outbound(private_ipsec_processor_t *this)
|
|||||||
policy = ipsec->policies->find_by_packet(ipsec->policies, packet, FALSE, 0);
|
policy = ipsec->policies->find_by_packet(ipsec->policies, packet, FALSE, 0);
|
||||||
if (!policy)
|
if (!policy)
|
||||||
{
|
{
|
||||||
DBG2(DBG_ESP, "no matching outbound IPsec policy for %H == %H",
|
DBG2(DBG_ESP, "no matching outbound IPsec policy for %#H == %#H [%hhu]",
|
||||||
packet->get_source(packet), packet->get_destination(packet));
|
packet->get_source(packet), packet->get_destination(packet),
|
||||||
|
packet->get_next_header(packet));
|
||||||
packet->destroy(packet);
|
packet->destroy(packet);
|
||||||
return JOB_REQUEUE_DIRECT;
|
return JOB_REQUEUE_DIRECT;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user