Re: [PATCH net] xfrm: Clear sk_dst_cache when applying per-socket policy.

2017-10-25 Thread Jonathan Basseri
On Tue, Oct 24, 2017 at 9:25 PM, Steffen Klassert wrote: > On Tue, Oct 24, 2017 at 09:58:48AM -0700, Jonathan Basseri 😶 wrote: >> On Tue, Oct 24, 2017 at 12:04 AM, Steffen Klassert >> wrote: >> > >> > On Mon, Oct 23, 2017 at 06:18:55PM -0700, Jonathan Basseri wrote: >> > > If a socket has a valid

Re: [PATCH net] xfrm: Clear sk_dst_cache when applying per-socket policy.

2017-10-24 Thread Steffen Klassert
On Tue, Oct 24, 2017 at 09:58:48AM -0700, Jonathan Basseri 😶 wrote: > On Tue, Oct 24, 2017 at 12:04 AM, Steffen Klassert > wrote: > > > > On Mon, Oct 23, 2017 at 06:18:55PM -0700, Jonathan Basseri wrote: > > > If a socket has a valid dst cache, then xfrm_lookup_route will get > > > skipped. Howeve

Re: [PATCH net] xfrm: Clear sk_dst_cache when applying per-socket policy.

2017-10-24 Thread Jonathan Basseri 😶
On Tue, Oct 24, 2017 at 12:04 AM, Steffen Klassert wrote: > > On Mon, Oct 23, 2017 at 06:18:55PM -0700, Jonathan Basseri wrote: > > If a socket has a valid dst cache, then xfrm_lookup_route will get > > skipped. However, the cache is not invalidated when applying policy to a > > socket (i.e. IPV6_

Re: [PATCH net] xfrm: Clear sk_dst_cache when applying per-socket policy.

2017-10-24 Thread Steffen Klassert
On Mon, Oct 23, 2017 at 06:18:55PM -0700, Jonathan Basseri wrote: > If a socket has a valid dst cache, then xfrm_lookup_route will get > skipped. However, the cache is not invalidated when applying policy to a > socket (i.e. IPV6_XFRM_POLICY). The result is that new policies are > sometimes ignored

Re: [PATCH net] xfrm: Clear sk_dst_cache when applying per-socket policy.

2017-10-23 Thread Jonathan Basseri 😶
On Mon, Oct 23, 2017 at 6:18 PM, Jonathan Basseri wrote: > If a socket has a valid dst cache, then xfrm_lookup_route will get > skipped. However, the cache is not invalidated when applying policy to a > socket (i.e. IPV6_XFRM_POLICY). The result is that new policies are > sometimes ignored on thos

[PATCH net] xfrm: Clear sk_dst_cache when applying per-socket policy.

2017-10-23 Thread Jonathan Basseri
If a socket has a valid dst cache, then xfrm_lookup_route will get skipped. However, the cache is not invalidated when applying policy to a socket (i.e. IPV6_XFRM_POLICY). The result is that new policies are sometimes ignored on those sockets. (Note: This was broken for IPv4 and IPv6 at different t

Re: [PATCH net] xfrm: Clear sk_dst_cache when applying per-socket policy.

2017-08-16 Thread Jakub Sitnicki
On Wed, 16 Aug 2017 03:43:54 -0700 Eric Dumazet wrote: > On Wed, 2017-08-16 at 11:03 +0200, Jakub Sitnicki wrote: > > On Tue, 15 Aug 2017 15:25:10 -0700 > > Jonathan Basseri wrote: > > > > > If an IPv6 socket has a valid dst cache, then xfrm_lookup_route will get > > > skipped. However, the c

Re: [PATCH net] xfrm: Clear sk_dst_cache when applying per-socket policy.

2017-08-16 Thread Eric Dumazet
On Wed, 2017-08-16 at 11:03 +0200, Jakub Sitnicki wrote: > On Tue, 15 Aug 2017 15:25:10 -0700 > Jonathan Basseri wrote: > > > If an IPv6 socket has a valid dst cache, then xfrm_lookup_route will get > > skipped. However, the cache is not invalidated when applying policy to a > > socket (i.e. IPV6

Re: [PATCH net] xfrm: Clear sk_dst_cache when applying per-socket policy.

2017-08-16 Thread Jakub Sitnicki
On Tue, 15 Aug 2017 15:25:10 -0700 Jonathan Basseri wrote: > If an IPv6 socket has a valid dst cache, then xfrm_lookup_route will get > skipped. However, the cache is not invalidated when applying policy to a > socket (i.e. IPV6_XFRM_POLICY). The result is that new policies are > sometimes ignore

Re: [PATCH net] xfrm: Clear sk_dst_cache when applying per-socket policy.

2017-08-16 Thread Lorenzo Colitti
On Wed, Aug 16, 2017 at 7:25 AM, Jonathan Basseri wrote: > If an IPv6 socket has a valid dst cache Did you look into why IPv4 does not suffer from this problem? That said, clearing the dst cache entry does seem prudent in general.

[PATCH net] xfrm: Clear sk_dst_cache when applying per-socket policy.

2017-08-15 Thread Jonathan Basseri
If an IPv6 socket has a valid dst cache, then xfrm_lookup_route will get skipped. However, the cache is not invalidated when applying policy to a socket (i.e. IPV6_XFRM_POLICY). The result is that new policies are sometimes ignored on those sockets. This can be demonstrated like so, 1. Create UDPv