diff mbox

[net-next,3/3] xfrm: Don't prohibit AH from using ESN feature

Message ID 1389171192-28091-4-git-send-email-fan.du@windriver.com
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

fan.du Jan. 8, 2014, 8:53 a.m. UTC
Clear checking when user try to use ESN through netlink keymgr for AH.

Signed-off-by: Fan Du <fan.du@windriver.com>
---
 net/xfrm/xfrm_user.c |    4 ----
 1 file changed, 4 deletions(-)

Comments

Steffen Klassert Jan. 9, 2014, 10:50 a.m. UTC | #1
On Wed, Jan 08, 2014 at 04:53:12PM +0800, Fan Du wrote:
> Clear checking when user try to use ESN through netlink keymgr for AH.
> 
> Signed-off-by: Fan Du <fan.du@windriver.com>
> ---
>  net/xfrm/xfrm_user.c |    4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
> index 97681a3..f362a78 100644
> --- a/net/xfrm/xfrm_user.c
> +++ b/net/xfrm/xfrm_user.c
> @@ -141,10 +141,6 @@ static inline int verify_replay(struct xfrm_usersa_info *p,
>  
>  	if (!rt)
>  		return 0;
> -
> -	if (p->id.proto != IPPROTO_ESP)
> -		return -EINVAL;
> -

You can not change this as long as AH for ipv6 does not
support ESN. Please provide the ipv6 side too.

Also, simply removing this check is wrong in any case.
You have to make sure that we catch if someone tries
to insert an ESN state for other unsupported protocols,
like ipcomp.
--
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
fan.du Jan. 9, 2014, 11:09 a.m. UTC | #2
On 2014年01月09日 18:50, Steffen Klassert wrote:
> On Wed, Jan 08, 2014 at 04:53:12PM +0800, Fan Du wrote:
>> Clear checking when user try to use ESN through netlink keymgr for AH.
>>
>> Signed-off-by: Fan Du<fan.du@windriver.com>
>> ---
>>   net/xfrm/xfrm_user.c |    4 ----
>>   1 file changed, 4 deletions(-)
>>
>> diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
>> index 97681a3..f362a78 100644
>> --- a/net/xfrm/xfrm_user.c
>> +++ b/net/xfrm/xfrm_user.c
>> @@ -141,10 +141,6 @@ static inline int verify_replay(struct xfrm_usersa_info *p,
>>
>>   	if (!rt)
>>   		return 0;
>> -
>> -	if (p->id.proto != IPPROTO_ESP)
>> -		return -EINVAL;
>> -
>
> You can not change this as long as AH for ipv6 does not
> support ESN. Please provide the ipv6 side too.
>
> Also, simply removing this check is wrong in any case.
> You have to make sure that we catch if someone tries
> to insert an ESN state for other unsupported protocols,
> like ipcomp.
>

Sure, will add IPv6 support soon :)
diff mbox

Patch

diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 97681a3..f362a78 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -141,10 +141,6 @@  static inline int verify_replay(struct xfrm_usersa_info *p,
 
 	if (!rt)
 		return 0;
-
-	if (p->id.proto != IPPROTO_ESP)
-		return -EINVAL;
-
 	if (p->replay_window != 0)
 		return -EINVAL;