Is there a bug about xfrm_lookup in xfrm_policy.c?
 
int xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl,
        struct sock *sk, int flags)
{
 ....
 
 struct dst_entry *dst, *dst_orig = *dst_p; /* note */
 ....
 
 /* if policy is "spdadd 10.0.11.0/24[any] 10.0.11.33/32[any] any -P out none", should it reach here? I think so*/
 switch (policy->action) {
 case XFRM_POLICY_BLOCK:
  /* Prohibit the flow */
  err = -EPERM;
  goto error;
 case XFRM_POLICY_ALLOW:
  .....
 }
 
 /* note: if policy is none , the packet should be sent out. but, now in this case dst = ? */
 *dst_p = dst;
 dst_release(dst_orig);
  xfrm_pols_put(pols, npols);
 return 0;
 
....
 
}
I think there is a bug about none policy, isn't there?
 
 



一起来,150万人同时在玩的梦幻西游