aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/xfrm6_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/xfrm6_state.c')
-rw-r--r--net/ipv6/xfrm6_state.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/net/ipv6/xfrm6_state.c b/net/ipv6/xfrm6_state.c
index 40fcaab7e028..d88cd92c864e 100644
--- a/net/ipv6/xfrm6_state.c
+++ b/net/ipv6/xfrm6_state.c
@@ -63,44 +63,6 @@ __xfrm6_init_tempsel(struct xfrm_state *x, struct flowi *fl,
63 x->props.family = AF_INET6; 63 x->props.family = AF_INET6;
64} 64}
65 65
66static struct xfrm_state *
67__xfrm6_state_lookup_byaddr(xfrm_address_t *daddr, xfrm_address_t *saddr,
68 u8 proto)
69{
70 struct xfrm_state *x = NULL;
71 unsigned h;
72
73 h = __xfrm6_src_hash(saddr);
74 list_for_each_entry(x, xfrm6_state_afinfo.state_bysrc+h, bysrc) {
75 if (x->props.family == AF_INET6 &&
76 ipv6_addr_equal((struct in6_addr *)daddr, (struct in6_addr *)x->id.daddr.a6) &&
77 ipv6_addr_equal((struct in6_addr *)saddr, (struct in6_addr *)x->props.saddr.a6) &&
78 proto == x->id.proto) {
79 xfrm_state_hold(x);
80 return x;
81 }
82 }
83 return NULL;
84}
85
86static struct xfrm_state *
87__xfrm6_state_lookup(xfrm_address_t *daddr, u32 spi, u8 proto)
88{
89 unsigned h = __xfrm6_spi_hash(daddr, spi, proto);
90 struct xfrm_state *x;
91
92 list_for_each_entry(x, xfrm6_state_afinfo.state_byspi+h, byspi) {
93 if (x->props.family == AF_INET6 &&
94 spi == x->id.spi &&
95 ipv6_addr_equal((struct in6_addr *)daddr, (struct in6_addr *)x->id.daddr.a6) &&
96 proto == x->id.proto) {
97 xfrm_state_hold(x);
98 return x;
99 }
100 }
101 return NULL;
102}
103
104static int 66static int
105__xfrm6_state_sort(struct xfrm_state **dst, struct xfrm_state **src, int n) 67__xfrm6_state_sort(struct xfrm_state **dst, struct xfrm_state **src, int n)
106{ 68{
@@ -223,8 +185,6 @@ __xfrm6_tmpl_sort(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, int n)
223static struct xfrm_state_afinfo xfrm6_state_afinfo = { 185static struct xfrm_state_afinfo xfrm6_state_afinfo = {
224 .family = AF_INET6, 186 .family = AF_INET6,
225 .init_tempsel = __xfrm6_init_tempsel, 187 .init_tempsel = __xfrm6_init_tempsel,
226 .state_lookup = __xfrm6_state_lookup,
227 .state_lookup_byaddr = __xfrm6_state_lookup_byaddr,
228 .tmpl_sort = __xfrm6_tmpl_sort, 188 .tmpl_sort = __xfrm6_tmpl_sort,
229 .state_sort = __xfrm6_state_sort, 189 .state_sort = __xfrm6_state_sort,
230}; 190};