Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
acacb960
Commit
acacb960
authored
Mar 24, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPSEC]: Kill skb_ah_walk, not needed.
parent
9a98fe28
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
87 deletions
+6
-87
include/net/ah.h
include/net/ah.h
+1
-4
include/net/esp.h
include/net/esp.h
+0
-2
include/net/xfrm.h
include/net/xfrm.h
+3
-0
net/netsyms.c
net/netsyms.c
+1
-4
net/xfrm/xfrm_algo.c
net/xfrm/xfrm_algo.c
+1
-77
No files found.
include/net/ah.h
View file @
acacb960
...
@@ -17,9 +17,6 @@ struct ah_data
...
@@ -17,9 +17,6 @@ struct ah_data
struct
crypto_tfm
*
tfm
;
struct
crypto_tfm
*
tfm
;
};
};
extern
void
skb_ah_walk
(
const
struct
sk_buff
*
skb
,
struct
crypto_tfm
*
tfm
,
icv_update_fn_t
icv_update
);
static
inline
void
static
inline
void
ah_hmac_digest
(
struct
ah_data
*
ahp
,
struct
sk_buff
*
skb
,
u8
*
auth_data
)
ah_hmac_digest
(
struct
ah_data
*
ahp
,
struct
sk_buff
*
skb
,
u8
*
auth_data
)
{
{
...
@@ -27,7 +24,7 @@ ah_hmac_digest(struct ah_data *ahp, struct sk_buff *skb, u8 *auth_data)
...
@@ -27,7 +24,7 @@ ah_hmac_digest(struct ah_data *ahp, struct sk_buff *skb, u8 *auth_data)
memset
(
auth_data
,
0
,
ahp
->
icv_trunc_len
);
memset
(
auth_data
,
0
,
ahp
->
icv_trunc_len
);
crypto_hmac_init
(
tfm
,
ahp
->
key
,
&
ahp
->
key_len
);
crypto_hmac_init
(
tfm
,
ahp
->
key
,
&
ahp
->
key_len
);
skb_
ah_walk
(
skb
,
tfm
,
crypto_hmac_update
);
skb_
icv_walk
(
skb
,
tfm
,
0
,
skb
->
len
,
crypto_hmac_update
);
crypto_hmac_final
(
tfm
,
ahp
->
key
,
&
ahp
->
key_len
,
ahp
->
work_icv
);
crypto_hmac_final
(
tfm
,
ahp
->
key
,
&
ahp
->
key_len
,
ahp
->
work_icv
);
memcpy
(
auth_data
,
ahp
->
work_icv
,
ahp
->
icv_trunc_len
);
memcpy
(
auth_data
,
ahp
->
work_icv
,
ahp
->
icv_trunc_len
);
}
}
...
...
include/net/esp.h
View file @
acacb960
...
@@ -33,8 +33,6 @@ struct esp_data
...
@@ -33,8 +33,6 @@ struct esp_data
}
auth
;
}
auth
;
};
};
extern
void
skb_icv_walk
(
const
struct
sk_buff
*
skb
,
struct
crypto_tfm
*
tfm
,
int
offset
,
int
len
,
icv_update_fn_t
icv_update
);
extern
int
skb_to_sgvec
(
struct
sk_buff
*
skb
,
struct
scatterlist
*
sg
,
int
offset
,
int
len
);
extern
int
skb_to_sgvec
(
struct
sk_buff
*
skb
,
struct
scatterlist
*
sg
,
int
offset
,
int
len
);
extern
int
skb_cow_data
(
struct
sk_buff
*
skb
,
int
tailbits
,
struct
sk_buff
**
trailer
);
extern
int
skb_cow_data
(
struct
sk_buff
*
skb
,
int
tailbits
,
struct
sk_buff
**
trailer
);
extern
void
*
pskb_put
(
struct
sk_buff
*
skb
,
struct
sk_buff
*
tail
,
int
len
);
extern
void
*
pskb_put
(
struct
sk_buff
*
skb
,
struct
sk_buff
*
tail
,
int
len
);
...
...
include/net/xfrm.h
View file @
acacb960
...
@@ -781,4 +781,7 @@ extern struct xfrm_algo_desc *xfrm_calg_get_byname(char *name);
...
@@ -781,4 +781,7 @@ extern struct xfrm_algo_desc *xfrm_calg_get_byname(char *name);
struct
crypto_tfm
;
struct
crypto_tfm
;
typedef
void
(
icv_update_fn_t
)(
struct
crypto_tfm
*
,
struct
scatterlist
*
,
unsigned
int
);
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
,
int
offset
,
int
len
,
icv_update_fn_t
icv_update
);
#endif
/* _NET_XFRM_H */
#endif
/* _NET_XFRM_H */
net/netsyms.c
View file @
acacb960
...
@@ -356,13 +356,10 @@ EXPORT_SYMBOL_GPL(xfrm_calg_get_byid);
...
@@ -356,13 +356,10 @@ EXPORT_SYMBOL_GPL(xfrm_calg_get_byid);
EXPORT_SYMBOL_GPL
(
xfrm_aalg_get_byname
);
EXPORT_SYMBOL_GPL
(
xfrm_aalg_get_byname
);
EXPORT_SYMBOL_GPL
(
xfrm_ealg_get_byname
);
EXPORT_SYMBOL_GPL
(
xfrm_ealg_get_byname
);
EXPORT_SYMBOL_GPL
(
xfrm_calg_get_byname
);
EXPORT_SYMBOL_GPL
(
xfrm_calg_get_byname
);
#if defined(CONFIG_INET_AH) || defined(CONFIG_INET_AH_MODULE) || defined(CONFIG_INET6_AH) || defined(CONFIG_INET6_AH_MODULE)
EXPORT_SYMBOL_GPL
(
skb_icv_walk
);
EXPORT_SYMBOL_GPL
(
skb_ah_walk
);
#endif
#if defined(CONFIG_INET_ESP) || defined(CONFIG_INET_ESP_MODULE) || defined(CONFIG_INET6_ESP) || defined(CONFIG_INET6_ESP_MODULE)
#if defined(CONFIG_INET_ESP) || defined(CONFIG_INET_ESP_MODULE) || defined(CONFIG_INET6_ESP) || defined(CONFIG_INET6_ESP_MODULE)
EXPORT_SYMBOL_GPL
(
skb_cow_data
);
EXPORT_SYMBOL_GPL
(
skb_cow_data
);
EXPORT_SYMBOL_GPL
(
pskb_put
);
EXPORT_SYMBOL_GPL
(
pskb_put
);
EXPORT_SYMBOL_GPL
(
skb_icv_walk
);
EXPORT_SYMBOL_GPL
(
skb_to_sgvec
);
EXPORT_SYMBOL_GPL
(
skb_to_sgvec
);
#endif
#endif
...
...
net/xfrm/xfrm_algo.c
View file @
acacb960
...
@@ -440,83 +440,6 @@ int xfrm_count_enc_supported(void)
...
@@ -440,83 +440,6 @@ int xfrm_count_enc_supported(void)
return
n
;
return
n
;
}
}
#if defined(CONFIG_INET_AH) || defined(CONFIG_INET_AH_MODULE) || defined(CONFIG_INET6_AH) || defined(CONFIG_INET6_AH_MODULE)
void
skb_ah_walk
(
const
struct
sk_buff
*
skb
,
struct
crypto_tfm
*
tfm
,
icv_update_fn_t
icv_update
)
{
int
offset
=
0
;
int
len
=
skb
->
len
;
int
start
=
skb
->
len
-
skb
->
data_len
;
int
i
,
copy
=
start
-
offset
;
struct
scatterlist
sg
;
/* Checksum header. */
if
(
copy
>
0
)
{
if
(
copy
>
len
)
copy
=
len
;
sg
.
page
=
virt_to_page
(
skb
->
data
+
offset
);
sg
.
offset
=
(
unsigned
long
)(
skb
->
data
+
offset
)
%
PAGE_SIZE
;
sg
.
length
=
copy
;
icv_update
(
tfm
,
&
sg
,
1
);
if
((
len
-=
copy
)
==
0
)
return
;
offset
+=
copy
;
}
for
(
i
=
0
;
i
<
skb_shinfo
(
skb
)
->
nr_frags
;
i
++
)
{
int
end
;
BUG_TRAP
(
start
<=
offset
+
len
);
end
=
start
+
skb_shinfo
(
skb
)
->
frags
[
i
].
size
;
if
((
copy
=
end
-
offset
)
>
0
)
{
skb_frag_t
*
frag
=
&
skb_shinfo
(
skb
)
->
frags
[
i
];
if
(
copy
>
len
)
copy
=
len
;
sg
.
page
=
frag
->
page
;
sg
.
offset
=
frag
->
page_offset
+
offset
-
start
;
sg
.
length
=
copy
;
icv_update
(
tfm
,
&
sg
,
1
);
if
(
!
(
len
-=
copy
))
return
;
offset
+=
copy
;
}
start
=
end
;
}
if
(
skb_shinfo
(
skb
)
->
frag_list
)
{
struct
sk_buff
*
list
=
skb_shinfo
(
skb
)
->
frag_list
;
for
(;
list
;
list
=
list
->
next
)
{
int
end
;
BUG_TRAP
(
start
<=
offset
+
len
);
end
=
start
+
list
->
len
;
if
((
copy
=
end
-
offset
)
>
0
)
{
if
(
copy
>
len
)
copy
=
len
;
skb_ah_walk
(
list
,
tfm
,
icv_update
);
if
((
len
-=
copy
)
==
0
)
return
;
offset
+=
copy
;
}
start
=
end
;
}
}
if
(
len
)
BUG
();
}
#endif
#if defined(CONFIG_INET_ESP) || defined(CONFIG_INET_ESP_MODULE) || defined(CONFIG_INET6_ESP) || defined(CONFIG_INET6_ESP_MODULE)
/* Move to common area: it is shared with AH. */
/* Move to common area: it is shared with AH. */
void
skb_icv_walk
(
const
struct
sk_buff
*
skb
,
struct
crypto_tfm
*
tfm
,
void
skb_icv_walk
(
const
struct
sk_buff
*
skb
,
struct
crypto_tfm
*
tfm
,
...
@@ -591,6 +514,7 @@ void skb_icv_walk(const struct sk_buff *skb, struct crypto_tfm *tfm,
...
@@ -591,6 +514,7 @@ void skb_icv_walk(const struct sk_buff *skb, struct crypto_tfm *tfm,
BUG
();
BUG
();
}
}
#if defined(CONFIG_INET_ESP) || defined(CONFIG_INET_ESP_MODULE) || defined(CONFIG_INET6_ESP) || defined(CONFIG_INET6_ESP_MODULE)
/* Looking generic it is not used in another places. */
/* Looking generic it is not used in another places. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment