libipsec: check for a policy with the reqid of the SA on decapsulation

To prevent a client from sending a packet with a source address of a different
client, we require a policy bound via reqid to the decapsulating SA.
This commit is contained in:
Martin Willi
2013-09-13 13:56:43 +02:00
parent 791fde1669
commit 96136a1229
3 changed files with 14 additions and 7 deletions
+3 -1
View File
@@ -97,10 +97,12 @@ struct ipsec_policy_mgr_t {
*
* @param packet IP packet to match
* @param inbound TRUE for an inbound packet
* @param reqid require a policy with a specific reqid, 0 for any
* @return reference to the policy, or NULL if none found
*/
ipsec_policy_t *(*find_by_packet)(ipsec_policy_mgr_t *this,
ip_packet_t *packet, bool inbound);
ip_packet_t *packet, bool inbound,
u_int32_t reqid);
/**
* Destroy an ipsec_policy_mgr_t