xfrm: Don't prohibit AH from using ESN feature
authorFan Du <fan.du@windriver.com>
Sat, 18 Jan 2014 01:54:28 +0000 (09:54 +0800)
committerSteffen Klassert <steffen.klassert@secunet.com>
Wed, 12 Feb 2014 06:02:11 +0000 (07:02 +0100)
Clear checking when user try to use ESN through netlink keymgr for AH.
As only ESP and AH support ESN feature according to RFC.

Signed-off-by: Fan Du <fan.du@windriver.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_user.c

index 1ae3ec7c18b0de977b1b781c8fee72d8357543bc..ade9988f6e33a5dbb5529c7076ffe705a3bbde2c 100644 (file)
@@ -142,7 +142,8 @@ static inline int verify_replay(struct xfrm_usersa_info *p,
        if (!rt)
                return 0;
 
-       if (p->id.proto != IPPROTO_ESP)
+       /* As only ESP and AH support ESN feature. */
+       if ((p->id.proto != IPPROTO_ESP) && (p->id.proto != IPPROTO_AH))
                return -EINVAL;
 
        if (p->replay_window != 0)