Subject: Re: [PATCH 16/44] [XFRM] IPV6: Restrict bundle reusing

From: Masahide NAKAMURA <[email-masked]>
Date: Thu, 24 Aug 2006 11:54:45 +0900

David Miller wrote:
> From: YOSHIFUJI Hideaki <[email-masked]>
> Date: Thu, 24 Aug 2006 00:02:17 +0900
> 
>> From: Masahide NAKAMURA <[email-masked]>
>>
>> For outbound transformation, bundle is checked whether it is
>> suitable for current flow to be reused or not. In such IPv6 case
>> as below, transformation may apply incorrect bundle for the flow instead
>> of creating another bundle:
>>
>> - The policy selector has destination prefix length < 128
>>   (Two or more addresses can be matched it)
>> - Its bundle holds dst entry of default route whose prefix length < 128
>>   (Previous traffic was used such route as next hop)
>> - The policy and the bundle were used a transport mode state and
>>   this time flow address is not matched the bundled state.
>>
>> This issue is found by Mobile IPv6 usage to protect mobility signaling
>> by IPsec, but it is not a Mobile IPv6 specific.
>> This patch adds strict check to xfrm_bundle_ok() for each
>> state mode and address when prefix length is less than 128.
>>
>> Signed-off-by: Masahide NAKAMURA <[email-masked]>
>> Signed-off-by: YOSHIFUJI Hideaki <[email-masked]>
> 
> Applied.  Maybe ipv4 side wants to check for prefix length < 32?
> Or does it not matter for some reason under ipv4?

Logically yes. But I was not clear IPv4 __xfrm4_find_bundle()
has no prefix check as opposed to IPv6 one then I couldn't include it.

-- 
Masahide NAKAMURA