@@ -1889,7 +1889,7 @@ EXPORT_SYMBOL(xfrm_policy_walk_done);
18891889 */
18901890static int xfrm_policy_match (const struct xfrm_policy * pol ,
18911891 const struct flowi * fl ,
1892- u8 type , u16 family , int dir , u32 if_id )
1892+ u8 type , u16 family , u32 if_id )
18931893{
18941894 const struct xfrm_selector * sel = & pol -> selector ;
18951895 int ret = - ESRCH ;
@@ -2014,7 +2014,7 @@ static struct xfrm_policy *
20142014__xfrm_policy_eval_candidates (struct hlist_head * chain ,
20152015 struct xfrm_policy * prefer ,
20162016 const struct flowi * fl ,
2017- u8 type , u16 family , int dir , u32 if_id )
2017+ u8 type , u16 family , u32 if_id )
20182018{
20192019 u32 priority = prefer ? prefer -> priority : ~0u ;
20202020 struct xfrm_policy * pol ;
@@ -2028,7 +2028,7 @@ __xfrm_policy_eval_candidates(struct hlist_head *chain,
20282028 if (pol -> priority > priority )
20292029 break ;
20302030
2031- err = xfrm_policy_match (pol , fl , type , family , dir , if_id );
2031+ err = xfrm_policy_match (pol , fl , type , family , if_id );
20322032 if (err ) {
20332033 if (err != - ESRCH )
20342034 return ERR_PTR (err );
@@ -2053,16 +2053,15 @@ static struct xfrm_policy *
20532053xfrm_policy_eval_candidates (struct xfrm_pol_inexact_candidates * cand ,
20542054 struct xfrm_policy * prefer ,
20552055 const struct flowi * fl ,
2056- u8 type , u16 family , int dir , u32 if_id )
2056+ u8 type , u16 family , u32 if_id )
20572057{
20582058 struct xfrm_policy * tmp ;
20592059 int i ;
20602060
20612061 for (i = 0 ; i < ARRAY_SIZE (cand -> res ); i ++ ) {
20622062 tmp = __xfrm_policy_eval_candidates (cand -> res [i ],
20632063 prefer ,
2064- fl , type , family , dir ,
2065- if_id );
2064+ fl , type , family , if_id );
20662065 if (!tmp )
20672066 continue ;
20682067
@@ -2101,7 +2100,7 @@ static struct xfrm_policy *xfrm_policy_lookup_bytype(struct net *net, u8 type,
21012100
21022101 ret = NULL ;
21032102 hlist_for_each_entry_rcu (pol , chain , bydst ) {
2104- err = xfrm_policy_match (pol , fl , type , family , dir , if_id );
2103+ err = xfrm_policy_match (pol , fl , type , family , if_id );
21052104 if (err ) {
21062105 if (err == - ESRCH )
21072106 continue ;
@@ -2120,7 +2119,7 @@ static struct xfrm_policy *xfrm_policy_lookup_bytype(struct net *net, u8 type,
21202119 goto skip_inexact ;
21212120
21222121 pol = xfrm_policy_eval_candidates (& cand , ret , fl , type ,
2123- family , dir , if_id );
2122+ family , if_id );
21242123 if (pol ) {
21252124 ret = pol ;
21262125 if (IS_ERR (pol ))
0 commit comments