diff options
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r-- | include/net/xfrm.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 15ec19dcf9c8..f699cdcab406 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -392,6 +392,15 @@ extern int xfrm_unregister_km(struct xfrm_mgr *km); | |||
392 | 392 | ||
393 | extern unsigned int xfrm_policy_count[XFRM_POLICY_MAX*2]; | 393 | extern unsigned int xfrm_policy_count[XFRM_POLICY_MAX*2]; |
394 | 394 | ||
395 | /* Audit Information */ | ||
396 | struct xfrm_audit | ||
397 | { | ||
398 | uid_t loginuid; | ||
399 | u32 secid; | ||
400 | }; | ||
401 | void xfrm_audit_log(uid_t auid, u32 secid, int type, int result, | ||
402 | struct xfrm_policy *xp, struct xfrm_state *x); | ||
403 | |||
395 | static inline void xfrm_pol_hold(struct xfrm_policy *policy) | 404 | static inline void xfrm_pol_hold(struct xfrm_policy *policy) |
396 | { | 405 | { |
397 | if (likely(policy != NULL)) | 406 | if (likely(policy != NULL)) |
@@ -906,7 +915,7 @@ static inline int xfrm_state_sort(struct xfrm_state **dst, struct xfrm_state **s | |||
906 | #endif | 915 | #endif |
907 | extern struct xfrm_state *xfrm_find_acq_byseq(u32 seq); | 916 | extern struct xfrm_state *xfrm_find_acq_byseq(u32 seq); |
908 | extern int xfrm_state_delete(struct xfrm_state *x); | 917 | extern int xfrm_state_delete(struct xfrm_state *x); |
909 | extern void xfrm_state_flush(u8 proto); | 918 | extern void xfrm_state_flush(u8 proto, struct xfrm_audit *audit_info); |
910 | extern int xfrm_replay_check(struct xfrm_state *x, __be32 seq); | 919 | extern int xfrm_replay_check(struct xfrm_state *x, __be32 seq); |
911 | extern void xfrm_replay_advance(struct xfrm_state *x, __be32 seq); | 920 | extern void xfrm_replay_advance(struct xfrm_state *x, __be32 seq); |
912 | extern void xfrm_replay_notify(struct xfrm_state *x, int event); | 921 | extern void xfrm_replay_notify(struct xfrm_state *x, int event); |
@@ -959,13 +968,13 @@ struct xfrm_policy *xfrm_policy_bysel_ctx(u8 type, int dir, | |||
959 | struct xfrm_selector *sel, | 968 | struct xfrm_selector *sel, |
960 | struct xfrm_sec_ctx *ctx, int delete); | 969 | struct xfrm_sec_ctx *ctx, int delete); |
961 | struct xfrm_policy *xfrm_policy_byid(u8, int dir, u32 id, int delete); | 970 | struct xfrm_policy *xfrm_policy_byid(u8, int dir, u32 id, int delete); |
962 | void xfrm_policy_flush(u8 type); | 971 | void xfrm_policy_flush(u8 type, struct xfrm_audit *audit_info); |
963 | u32 xfrm_get_acqseq(void); | 972 | u32 xfrm_get_acqseq(void); |
964 | void xfrm_alloc_spi(struct xfrm_state *x, __be32 minspi, __be32 maxspi); | 973 | void xfrm_alloc_spi(struct xfrm_state *x, __be32 minspi, __be32 maxspi); |
965 | struct xfrm_state * xfrm_find_acq(u8 mode, u32 reqid, u8 proto, | 974 | struct xfrm_state * xfrm_find_acq(u8 mode, u32 reqid, u8 proto, |
966 | xfrm_address_t *daddr, xfrm_address_t *saddr, | 975 | xfrm_address_t *daddr, xfrm_address_t *saddr, |
967 | int create, unsigned short family); | 976 | int create, unsigned short family); |
968 | extern void xfrm_policy_flush(u8 type); | 977 | extern void xfrm_policy_flush(u8 type, struct xfrm_audit *audit_info); |
969 | extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol); | 978 | extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol); |
970 | extern int xfrm_bundle_ok(struct xfrm_policy *pol, struct xfrm_dst *xdst, | 979 | extern int xfrm_bundle_ok(struct xfrm_policy *pol, struct xfrm_dst *xdst, |
971 | struct flowi *fl, int family, int strict); | 980 | struct flowi *fl, int family, int strict); |