--- zzzz-none-000/linux-3.10.107/net/xfrm/xfrm_state.c 2017-06-27 09:49:32.000000000 +0000 +++ vr9-7490-729/linux-3.10.107/net/xfrm/xfrm_state.c 2021-11-10 11:53:56.000000000 +0000 @@ -13,6 +13,12 @@ * */ +/** + * Some part of this file is modified by Ikanos Communications. + * + * Copyright (C) 2013-2014 Ikanos Communications. + */ + #include #include #include @@ -28,6 +34,25 @@ #include "xfrm_hash.h" +#if IS_ENABLED(CONFIG_FUSIV_KERNEL_AP_2_AP) +#if defined(CONFIG_IPSEC_AP_SUPPORT) +void (*ap2apIPsecRouteFlowDelete_ptr)(struct xfrm_state *x) = NULL; +void (*ap2apIPsecRouteFlowAdd_ptr)(struct xfrm_state *x) = NULL; +#endif + + +struct sock *xfrm_nl; +EXPORT_SYMBOL(xfrm_nl); + +u32 sysctl_xfrm_aevent_etime __read_mostly = XFRM_AE_ETIME; +EXPORT_SYMBOL(sysctl_xfrm_aevent_etime); + +u32 sysctl_xfrm_aevent_rseqth __read_mostly = XFRM_AE_SEQT_SIZE; +EXPORT_SYMBOL(sysctl_xfrm_aevent_rseqth); + +u32 sysctl_xfrm_acq_expires __read_mostly = 30; +#endif + /* Each xfrm_state may be linked to two tables: 1. Hash table by (spi,daddr,ah/esp) to find SA by SPI. (input,ctl) @@ -538,6 +563,12 @@ if (x->km.state != XFRM_STATE_DEAD) { x->km.state = XFRM_STATE_DEAD; spin_lock(&xfrm_state_lock); +#if IS_ENABLED(CONFIG_FUSIV_KERNEL_AP_2_AP) +#if defined(CONFIG_IPSEC_AP_SUPPORT) + if(ap2apIPsecRouteFlowDelete_ptr) + ap2apIPsecRouteFlowDelete_ptr(x); +#endif +#endif list_del(&x->km.all); hlist_del(&x->bydst); hlist_del(&x->bysrc); @@ -2222,3 +2253,10 @@ } EXPORT_SYMBOL_GPL(xfrm_audit_state_icvfail); #endif /* CONFIG_AUDITSYSCALL */ +#if IS_ENABLED(CONFIG_FUSIV_KERNEL_AP_2_AP) +#if defined(CONFIG_IPSEC_AP_SUPPORT) +EXPORT_SYMBOL(ap2apIPsecRouteFlowDelete_ptr); +EXPORT_SYMBOL(ap2apIPsecRouteFlowAdd_ptr); +#endif +#endif +