From: Fan Du Date: Sat, 18 Jan 2014 01:54:28 +0000 (+0800) Subject: xfrm: Don't prohibit AH from using ESN feature X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=01714109ea7e7ff4142f98a91114a97a91d34cdf;p=linux-beck.git 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 Signed-off-by: Steffen Klassert --- diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 1ae3ec7c18b0..ade9988f6e33 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -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)