aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/xfrm4_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/xfrm4_state.c')
-rw-r--r--net/ipv4/xfrm4_state.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/net/ipv4/xfrm4_state.c b/net/ipv4/xfrm4_state.c
index 9dc1afc17b6d..6a2a4ab42772 100644
--- a/net/ipv4/xfrm4_state.c
+++ b/net/ipv4/xfrm4_state.c
@@ -62,38 +62,10 @@ __xfrm4_init_tempsel(struct xfrm_state *x, struct flowi *fl,
62 x->props.family = AF_INET; 62 x->props.family = AF_INET;
63} 63}
64 64
65static struct xfrm_state *
66__xfrm4_state_lookup(xfrm_address_t *daddr, u32 spi, u8 proto)
67{
68 unsigned h = __xfrm4_spi_hash(daddr, spi, proto);
69 struct xfrm_state *x;
70
71 list_for_each_entry(x, xfrm4_state_afinfo.state_byspi+h, byspi) {
72 if (x->props.family == AF_INET &&
73 spi == x->id.spi &&
74 daddr->a4 == x->id.daddr.a4 &&
75 proto == x->id.proto) {
76 xfrm_state_hold(x);
77 return x;
78 }
79 }
80 return NULL;
81}
82
83/* placeholder until ipv4's code is written */
84static struct xfrm_state *
85__xfrm4_state_lookup_byaddr(xfrm_address_t *daddr, xfrm_address_t *saddr,
86 u8 proto)
87{
88 return NULL;
89}
90
91static struct xfrm_state_afinfo xfrm4_state_afinfo = { 65static struct xfrm_state_afinfo xfrm4_state_afinfo = {
92 .family = AF_INET, 66 .family = AF_INET,
93 .init_flags = xfrm4_init_flags, 67 .init_flags = xfrm4_init_flags,
94 .init_tempsel = __xfrm4_init_tempsel, 68 .init_tempsel = __xfrm4_init_tempsel,
95 .state_lookup = __xfrm4_state_lookup,
96 .state_lookup_byaddr = __xfrm4_state_lookup_byaddr,
97}; 69};
98 70
99void __init xfrm4_state_init(void) 71void __init xfrm4_state_init(void)