aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r--include/net/xfrm.h38
1 files changed, 30 insertions, 8 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 8287081d77f2..39ef925d39dd 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -416,13 +416,6 @@ struct xfrm_audit
416 u32 secid; 416 u32 secid;
417}; 417};
418 418
419/* SAD metadata, add more later */
420struct xfrm_sadinfo
421{
422 u32 sadhcnt; /* current hash bkts */
423 u32 sadhmcnt; /* max allowed hash bkts */
424 u32 sadcnt; /* current running count */
425};
426#ifdef CONFIG_AUDITSYSCALL 419#ifdef CONFIG_AUDITSYSCALL
427extern void xfrm_audit_log(uid_t auid, u32 secid, int type, int result, 420extern void xfrm_audit_log(uid_t auid, u32 secid, int type, int result,
428 struct xfrm_policy *xp, struct xfrm_state *x); 421 struct xfrm_policy *xp, struct xfrm_state *x);
@@ -591,6 +584,10 @@ struct xfrm_dst
591 struct rt6_info rt6; 584 struct rt6_info rt6;
592 } u; 585 } u;
593 struct dst_entry *route; 586 struct dst_entry *route;
587#ifdef CONFIG_XFRM_SUB_POLICY
588 struct flowi *origin;
589 struct xfrm_selector *partner;
590#endif
594 u32 genid; 591 u32 genid;
595 u32 route_mtu_cached; 592 u32 route_mtu_cached;
596 u32 child_mtu_cached; 593 u32 child_mtu_cached;
@@ -603,6 +600,12 @@ static inline void xfrm_dst_destroy(struct xfrm_dst *xdst)
603 dst_release(xdst->route); 600 dst_release(xdst->route);
604 if (likely(xdst->u.dst.xfrm)) 601 if (likely(xdst->u.dst.xfrm))
605 xfrm_state_put(xdst->u.dst.xfrm); 602 xfrm_state_put(xdst->u.dst.xfrm);
603#ifdef CONFIG_XFRM_SUB_POLICY
604 kfree(xdst->origin);
605 xdst->origin = NULL;
606 kfree(xdst->partner);
607 xdst->partner = NULL;
608#endif
606} 609}
607 610
608extern void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev); 611extern void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev);
@@ -942,10 +945,29 @@ static inline int xfrm_state_sort(struct xfrm_state **dst, struct xfrm_state **s
942 return -ENOSYS; 945 return -ENOSYS;
943} 946}
944#endif 947#endif
948
949struct xfrmk_sadinfo {
950 u32 sadhcnt; /* current hash bkts */
951 u32 sadhmcnt; /* max allowed hash bkts */
952 u32 sadcnt; /* current running count */
953};
954
955struct xfrmk_spdinfo {
956 u32 incnt;
957 u32 outcnt;
958 u32 fwdcnt;
959 u32 inscnt;
960 u32 outscnt;
961 u32 fwdscnt;
962 u32 spdhcnt;
963 u32 spdhmcnt;
964};
965
945extern struct xfrm_state *xfrm_find_acq_byseq(u32 seq); 966extern struct xfrm_state *xfrm_find_acq_byseq(u32 seq);
946extern int xfrm_state_delete(struct xfrm_state *x); 967extern int xfrm_state_delete(struct xfrm_state *x);
947extern void xfrm_state_flush(u8 proto, struct xfrm_audit *audit_info); 968extern void xfrm_state_flush(u8 proto, struct xfrm_audit *audit_info);
948extern void xfrm_sad_getinfo(struct xfrm_sadinfo *si); 969extern void xfrm_sad_getinfo(struct xfrmk_sadinfo *si);
970extern void xfrm_spd_getinfo(struct xfrmk_spdinfo *si);
949extern int xfrm_replay_check(struct xfrm_state *x, __be32 seq); 971extern int xfrm_replay_check(struct xfrm_state *x, __be32 seq);
950extern void xfrm_replay_advance(struct xfrm_state *x, __be32 seq); 972extern void xfrm_replay_advance(struct xfrm_state *x, __be32 seq);
951extern void xfrm_replay_notify(struct xfrm_state *x, int event); 973extern void xfrm_replay_notify(struct xfrm_state *x, int event);