git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
net
/
ipv4
/
ah4.c
diff --git
a/net/ipv4/ah4.c
b/net/ipv4/ah4.c
index
970fe58
..
e2e4771
100644
(file)
--- a/
net/ipv4/ah4.c
+++ b/
net/ipv4/ah4.c
@@
-6,6
+6,7
@@
#include <linux/crypto.h>
#include <linux/pfkeyv2.h>
#include <net/icmp.h>
#include <linux/crypto.h>
#include <linux/pfkeyv2.h>
#include <net/icmp.h>
+#include <net/protocol.h>
#include <asm/scatterlist.h>
#include <asm/scatterlist.h>
@@
-53,11
+54,9
@@
static int ip_clear_mutable_options(struct iphdr *iph, u32 *daddr)
return 0;
}
return 0;
}
-static int ah_output(struct sk_buff *skb)
+static int ah_output(struct
xfrm_state *x, struct
sk_buff *skb)
{
int err;
{
int err;
- struct dst_entry *dst = skb->dst;
- struct xfrm_state *x = dst->xfrm;
struct iphdr *iph, *top_iph;
struct ip_auth_hdr *ah;
struct ah_data *ahp;
struct iphdr *iph, *top_iph;
struct ip_auth_hdr *ah;
struct ah_data *ahp;
@@
-98,6
+97,7
@@
static int ah_output(struct sk_buff *skb)
ah->reserved = 0;
ah->spi = x->id.spi;
ah->seq_no = htonl(++x->replay.oseq);
ah->reserved = 0;
ah->spi = x->id.spi;
ah->seq_no = htonl(++x->replay.oseq);
+ xfrm_aevent_doreplay(x);
ahp->icv(ahp, skb, ah->auth_data);
top_iph->tos = iph->tos;
ahp->icv(ahp, skb, ah->auth_data);
top_iph->tos = iph->tos;
@@
-116,7
+116,7
@@
error:
return err;
}
return err;
}
-static int ah_input(struct xfrm_state *x, struct
xfrm_decap_state *decap, struct
sk_buff *skb)
+static int ah_input(struct xfrm_state *x, struct sk_buff *skb)
{
int ah_hlen;
struct iphdr *iph;
{
int ah_hlen;
struct iphdr *iph;
@@
-202,7
+202,7
@@
static void ah4_err(struct sk_buff *skb, u32 info)
xfrm_state_put(x);
}
xfrm_state_put(x);
}
-static int ah_init_state(struct xfrm_state *x
, void *args
)
+static int ah_init_state(struct xfrm_state *x)
{
struct ah_data *ahp = NULL;
struct xfrm_algo_desc *aalg_desc;
{
struct ah_data *ahp = NULL;
struct xfrm_algo_desc *aalg_desc;
@@
-236,7
+236,7
@@
static int ah_init_state(struct xfrm_state *x, void *args)
* we need for AH processing. This lookup cannot fail here
* after a successful crypto_alloc_tfm().
*/
* we need for AH processing. This lookup cannot fail here
* after a successful crypto_alloc_tfm().
*/
- aalg_desc = xfrm_aalg_get_byname(x->aalg->alg_name);
+ aalg_desc = xfrm_aalg_get_byname(x->aalg->alg_name
, 0
);
BUG_ON(!aalg_desc);
if (aalg_desc->uinfo.auth.icv_fullbits/8 !=
BUG_ON(!aalg_desc);
if (aalg_desc->uinfo.auth.icv_fullbits/8 !=
@@
-265,10
+265,8
@@
static int ah_init_state(struct xfrm_state *x, void *args)
error:
if (ahp) {
error:
if (ahp) {
- if (ahp->work_icv)
- kfree(ahp->work_icv);
- if (ahp->tfm)
- crypto_free_tfm(ahp->tfm);
+ kfree(ahp->work_icv);
+ crypto_free_tfm(ahp->tfm);
kfree(ahp);
}
return -EINVAL;
kfree(ahp);
}
return -EINVAL;
@@
-281,14
+279,10
@@
static void ah_destroy(struct xfrm_state *x)
if (!ahp)
return;
if (!ahp)
return;
- if (ahp->work_icv) {
- kfree(ahp->work_icv);
- ahp->work_icv = NULL;
- }
- if (ahp->tfm) {
- crypto_free_tfm(ahp->tfm);
- ahp->tfm = NULL;
- }
+ kfree(ahp->work_icv);
+ ahp->work_icv = NULL;
+ crypto_free_tfm(ahp->tfm);
+ ahp->tfm = NULL;
kfree(ahp);
}
kfree(ahp);
}