diff options
Diffstat (limited to 'net/xfrm/xfrm_state.c')
-rw-r--r-- | net/xfrm/xfrm_state.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 3003503d0c94..3ff76e84d548 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c | |||
@@ -216,10 +216,10 @@ static void xfrm_state_unlock_afinfo(struct xfrm_state_afinfo *afinfo) | |||
216 | write_unlock_bh(&xfrm_state_afinfo_lock); | 216 | write_unlock_bh(&xfrm_state_afinfo_lock); |
217 | } | 217 | } |
218 | 218 | ||
219 | int xfrm_register_type(struct xfrm_type *type, unsigned short family) | 219 | int xfrm_register_type(const struct xfrm_type *type, unsigned short family) |
220 | { | 220 | { |
221 | struct xfrm_state_afinfo *afinfo = xfrm_state_lock_afinfo(family); | 221 | struct xfrm_state_afinfo *afinfo = xfrm_state_lock_afinfo(family); |
222 | struct xfrm_type **typemap; | 222 | const struct xfrm_type **typemap; |
223 | int err = 0; | 223 | int err = 0; |
224 | 224 | ||
225 | if (unlikely(afinfo == NULL)) | 225 | if (unlikely(afinfo == NULL)) |
@@ -235,10 +235,10 @@ int xfrm_register_type(struct xfrm_type *type, unsigned short family) | |||
235 | } | 235 | } |
236 | EXPORT_SYMBOL(xfrm_register_type); | 236 | EXPORT_SYMBOL(xfrm_register_type); |
237 | 237 | ||
238 | int xfrm_unregister_type(struct xfrm_type *type, unsigned short family) | 238 | int xfrm_unregister_type(const struct xfrm_type *type, unsigned short family) |
239 | { | 239 | { |
240 | struct xfrm_state_afinfo *afinfo = xfrm_state_lock_afinfo(family); | 240 | struct xfrm_state_afinfo *afinfo = xfrm_state_lock_afinfo(family); |
241 | struct xfrm_type **typemap; | 241 | const struct xfrm_type **typemap; |
242 | int err = 0; | 242 | int err = 0; |
243 | 243 | ||
244 | if (unlikely(afinfo == NULL)) | 244 | if (unlikely(afinfo == NULL)) |
@@ -254,11 +254,11 @@ int xfrm_unregister_type(struct xfrm_type *type, unsigned short family) | |||
254 | } | 254 | } |
255 | EXPORT_SYMBOL(xfrm_unregister_type); | 255 | EXPORT_SYMBOL(xfrm_unregister_type); |
256 | 256 | ||
257 | static struct xfrm_type *xfrm_get_type(u8 proto, unsigned short family) | 257 | static const struct xfrm_type *xfrm_get_type(u8 proto, unsigned short family) |
258 | { | 258 | { |
259 | struct xfrm_state_afinfo *afinfo; | 259 | struct xfrm_state_afinfo *afinfo; |
260 | struct xfrm_type **typemap; | 260 | const struct xfrm_type **typemap; |
261 | struct xfrm_type *type; | 261 | const struct xfrm_type *type; |
262 | int modload_attempted = 0; | 262 | int modload_attempted = 0; |
263 | 263 | ||
264 | retry: | 264 | retry: |
@@ -281,7 +281,7 @@ retry: | |||
281 | return type; | 281 | return type; |
282 | } | 282 | } |
283 | 283 | ||
284 | static void xfrm_put_type(struct xfrm_type *type) | 284 | static void xfrm_put_type(const struct xfrm_type *type) |
285 | { | 285 | { |
286 | module_put(type->owner); | 286 | module_put(type->owner); |
287 | } | 287 | } |
@@ -1645,7 +1645,6 @@ err: | |||
1645 | xfrm_audit_state_replay(x, skb, net_seq); | 1645 | xfrm_audit_state_replay(x, skb, net_seq); |
1646 | return -EINVAL; | 1646 | return -EINVAL; |
1647 | } | 1647 | } |
1648 | EXPORT_SYMBOL(xfrm_replay_check); | ||
1649 | 1648 | ||
1650 | void xfrm_replay_advance(struct xfrm_state *x, __be32 net_seq) | 1649 | void xfrm_replay_advance(struct xfrm_state *x, __be32 net_seq) |
1651 | { | 1650 | { |
@@ -1667,7 +1666,6 @@ void xfrm_replay_advance(struct xfrm_state *x, __be32 net_seq) | |||
1667 | if (xfrm_aevent_is_on()) | 1666 | if (xfrm_aevent_is_on()) |
1668 | xfrm_replay_notify(x, XFRM_REPLAY_UPDATE); | 1667 | xfrm_replay_notify(x, XFRM_REPLAY_UPDATE); |
1669 | } | 1668 | } |
1670 | EXPORT_SYMBOL(xfrm_replay_advance); | ||
1671 | 1669 | ||
1672 | static LIST_HEAD(xfrm_km_list); | 1670 | static LIST_HEAD(xfrm_km_list); |
1673 | static DEFINE_RWLOCK(xfrm_km_lock); | 1671 | static DEFINE_RWLOCK(xfrm_km_lock); |