Przeglądaj źródła

xfrm: Don't prohibit AH from using ESN feature

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>
Fan Du 11 lat temu
rodzic
commit
01714109ea
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      net/xfrm/xfrm_user.c

+ 2 - 1
net/xfrm/xfrm_user.c

@@ -142,7 +142,8 @@ static inline int verify_replay(struct xfrm_usersa_info *p,
 	if (!rt)
 	if (!rt)
 		return 0;
 		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;
 		return -EINVAL;
 
 
 	if (p->replay_window != 0)
 	if (p->replay_window != 0)