[Top] [All Lists]

[2/4] [IPSEC] Kill spurious hard expire messages

To: "David S. Miller" <davem@xxxxxxxxxxxxx>
Subject: [2/4] [IPSEC] Kill spurious hard expire messages
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 9 Apr 2005 21:12:44 +1000
Cc: Masahide NAKAMURA <nakam@xxxxxxxxxxxxxx>, Patrick McHardy <kaber@xxxxxxxxx>, jamal <hadi@xxxxxxxxxx>, netdev <netdev@xxxxxxxxxxx>
In-reply-to: <>
References: <1112702604.1089.119.camel@jzny.localdomain> <>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6+20040907i

This patch ensures that the hard state/policy expire notifications are
only sent when the state/policy is successfully removed from their
respective tables.

As it is, it's possible for a state/policy to both expire through
reaching a hard limit, as well as being deleted by the user.

Note that this behaviour isn't actually forbidden by RFC 2367.
However, it is a quality of implementation issue.

As an added bonus, the restructuring in this patch will help
eventually in moving the expire notifications from softirq
context into process context, thus improving their reliability.

One important side-effect from this change is that SAs reaching
their hard byte/packet limits are now deleted immediately, just
like SAs that have reached their hard time limits.

Previously they were announced immediately but only deleted after
30 seconds.

This is bad because it prevents the system from issuing an ACQUIRE
command until the existing state was deleted by the user or expires
after the time is up.

In the scenario where the expire notification was lost this introduces
a 30 second delay into the system for no good reason.
Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

 include/net/xfrm.h     |    2 +-
 net/xfrm/xfrm_policy.c |    8 +++++---
 net/xfrm/xfrm_state.c  |   16 +++++++---------
 3 files changed, 13 insertions(+), 13 deletions(-)

Visit Openswan at
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page:
PGP Key:

Attachment: xfrm-event-2
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>