xfrm: Simplify SA looking up when using wildcard source
authorFan Du <fan.du@windriver.com>
Fri, 27 Sep 2013 08:32:50 +0000 (16:32 +0800)
committerSteffen Klassert <steffen.klassert@secunet.com>
Tue, 1 Oct 2013 08:09:33 +0000 (10:09 +0200)
commitf59bbdfa5c6e2a2f74f0e03d1beab6ddb9b3d466
treee23099b592a25afe33fa49f3adcd5a751d3013e4
parent6f1156383a419a4d19bdc196ffa8d4dbe2f01b36
xfrm: Simplify SA looking up when using wildcard source

__xfrm4/6_state_addr_check is a four steps check, all we need to do
is checking whether the destination address match when looking SA
using wildcard source address. Passing saddr from flow is worst option,
as the checking needs to reach the fourth step while actually only
one time checking will do the work.

So, simplify this process by only checking destination address when
using wildcard source address for looking up SAs.

Signed-off-by: Fan Du <fan.du@windriver.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_state.c