Skip to content

Commit

Permalink
[IPSEC]: Move linux/crypto.h inclusion out of net/xfrm.h
Browse files Browse the repository at this point in the history
The header file linux/crypto.h is only needed by a few files so including
it in net/xfrm.h (which is included by half of the networking stack) is a
waste.  This patch moves it out of net/xfrm.h and into the specific header
files that actually need it.

Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
herbertx committed Sep 21, 2006
1 parent 6521f30 commit 9409f38
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/net/ah.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef _NET_AH_H
#define _NET_AH_H

#include <linux/crypto.h>
#include <net/xfrm.h>

/* This is the maximum truncated ICV length that we know of. */
Expand Down
1 change: 1 addition & 0 deletions include/net/esp.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef _NET_ESP_H
#define _NET_ESP_H

#include <linux/crypto.h>
#include <net/xfrm.h>
#include <asm/scatterlist.h>

Expand Down
4 changes: 4 additions & 0 deletions include/net/ipcomp.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#ifndef _NET_IPCOMP_H
#define _NET_IPCOMP_H

#include <linux/types.h>

#define IPCOMP_SCRATCH_SIZE 65400

struct crypto_tfm;

struct ipcomp_data {
u16 threshold;
struct crypto_tfm **tfms;
Expand Down
2 changes: 1 addition & 1 deletion include/net/xfrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <linux/list.h>
#include <linux/skbuff.h>
#include <linux/socket.h>
#include <linux/crypto.h>
#include <linux/pfkeyv2.h>
#include <linux/in6.h>
#include <linux/mutex.h>
Expand Down Expand Up @@ -985,6 +984,7 @@ extern struct xfrm_algo_desc *xfrm_ealg_get_byname(char *name, int probe);
extern struct xfrm_algo_desc *xfrm_calg_get_byname(char *name, int probe);

struct crypto_tfm;
struct scatterlist;
typedef void (icv_update_fn_t)(struct crypto_tfm *, struct scatterlist *, unsigned int);

extern void skb_icv_walk(const struct sk_buff *skb, struct crypto_tfm *tfm,
Expand Down
1 change: 1 addition & 0 deletions net/xfrm/xfrm_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*
*/

#include <linux/crypto.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/types.h>
Expand Down

0 comments on commit 9409f38

Please sign in to comment.