From: Al Viro Date: Thu, 28 Sep 2006 01:48:33 +0000 (-0700) Subject: [XFRM]: xfrm_replay_advance() annotations X-Git-Tag: v2.6.19-rc1~858^2~33 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61f4627b2fecce9d5c9645e4b47e75a0c29ad8c3;p=linux-2.6 [XFRM]: xfrm_replay_advance() annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller --- diff --git a/include/net/xfrm.h b/include/net/xfrm.h index e6110559e5..1e2a4ddec9 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -936,7 +936,7 @@ extern struct xfrm_state *xfrm_find_acq_byseq(u32 seq); extern int xfrm_state_delete(struct xfrm_state *x); extern void xfrm_state_flush(u8 proto); extern int xfrm_replay_check(struct xfrm_state *x, __be32 seq); -extern void xfrm_replay_advance(struct xfrm_state *x, u32 seq); +extern void xfrm_replay_advance(struct xfrm_state *x, __be32 seq); extern void xfrm_replay_notify(struct xfrm_state *x, int event); extern int xfrm_state_check(struct xfrm_state *x, struct sk_buff *skb); extern int xfrm_state_mtu(struct xfrm_state *x, int mtu); diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 33e982961d..25657f57fb 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -1205,11 +1205,10 @@ int xfrm_replay_check(struct xfrm_state *x, __be32 net_seq) } EXPORT_SYMBOL(xfrm_replay_check); -void xfrm_replay_advance(struct xfrm_state *x, u32 seq) +void xfrm_replay_advance(struct xfrm_state *x, __be32 net_seq) { u32 diff; - - seq = ntohl(seq); + u32 seq = ntohl(net_seq); if (seq > x->replay.seq) { diff = seq - x->replay.seq;