diff mbox

[ipsec-next] xfrm: announce deleation of temporary SA

Message ID 1377265568-10959-1-git-send-email-nicolas.dichtel@6wind.com
State Awaiting Upstream, archived
Delegated to: David Miller
Headers show

Commit Message

Nicolas Dichtel Aug. 23, 2013, 1:46 p.m. UTC
Creation of temporary SA are announced by netlink, but there is no notification
for the deletion.
This patch fix this asymmetric situation.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---

Example:
ip xfrm monitor
acquire proto esp 
  sel src 10.22.6.51/32 dst 10.24.6.139/32 proto icmp type 8 code 0 
  policy src 10.22.6.51/32 dst 10.24.6.139/32 
    	dir out priority 3843 ptype main 
    	tmpl src 10.23.6.106 dst 10.23.6.206
    		proto esp reqid 2147483649 mode tunnel
Expired src 10.23.6.106 dst 10.23.6.206
	proto esp spi 0x00000000 reqid 2147483649 mode tunnel
	replay-window 0 
	sel src 10.22.6.51/32 dst 10.24.6.139/32 proto icmp type 8 code 0 
	hard 1

 net/xfrm/xfrm_state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Steffen Klassert Aug. 26, 2013, 10:54 a.m. UTC | #1
On Fri, Aug 23, 2013 at 03:46:08PM +0200, Nicolas Dichtel wrote:
> Creation of temporary SA are announced by netlink, but there is no notification
> for the deletion.
> This patch fix this asymmetric situation.
> 
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

Looks good, applied to ipsec-next. Thanks!
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 4f8ace855864..3fd65b73df7e 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -471,7 +471,7 @@  expired:
 	}
 
 	err = __xfrm_state_delete(x);
-	if (!err && x->id.spi)
+	if (!err)
 		km_state_expired(x, 1, 0);
 
 	xfrm_audit_state_delete(x, err ? 0 : 1,