2
0

616-net_optimize_xfrm_calls.patch 331 B

123456789101112
  1. --- a/net/netfilter/nf_nat_core.c
  2. +++ b/net/netfilter/nf_nat_core.c
  3. @@ -90,6 +90,9 @@ int nf_xfrm_me_harder(struct net *net, s
  4. struct dst_entry *dst;
  5. int err;
  6. + if (skb->dev && !dev_net(skb->dev)->xfrm.policy_count[XFRM_POLICY_OUT])
  7. + return 0;
  8. +
  9. err = xfrm_decode_session(skb, &fl, family);
  10. if (err < 0)
  11. return err;