stasn77

ipoe no dups

Apr 3rd, 2015
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.72 KB | None | 0 0
  1. --- a/drivers/ipoe/ipoe.c.orig  2015-04-03 08:18:59.000000000 +0300
  2. +++ b/drivers/ipoe/ipoe.c       2015-04-03 08:19:46.025491924 +0300
  3. @@ -423,7 +423,6 @@
  4.         struct iphdr  *iph;
  5.         struct ethhdr *eth;
  6.         struct sk_buff *skb1;
  7. -       struct dst_entry *dst;
  8.         /*struct arphdr *arp;
  9.         unsigned char *arp_ptr;
  10.         __be32 tip;*/
  11. @@ -452,18 +451,6 @@
  12.                 stats->tx_bytes += skb->len - ETH_HLEN;
  13.  #endif
  14.  
  15. -
  16. -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30)
  17. -               dst = skb_dst(skb);
  18. -#else
  19. -               dst = skb->dst;
  20. -#endif
  21. -               if (dst && dst->dev != skb->dev) {
  22. -                       skb->dev = dst->dev;
  23. -                       dev_queue_xmit(skb);
  24. -                       return NETDEV_TX_OK;
  25. -               }
  26. -
  27.                 //pr_info("ipoe: xmit1 %08x %08x\n", iph->saddr, iph->daddr);
  28.                 if (iph->daddr == ses->addr) {
  29.                         if (skb_shared(skb)) {
  30. @@ -871,7 +858,7 @@
  31.  static unsigned int ipt_out_hook(const struct nf_hook_ops *ops, struct sk_buff *skb, const struct net_device *in, const struct net_device *out, int (*okfn)(struct sk_buff *skb))
  32.  #endif
  33.  {
  34. -       int noff, iif;
  35. +       int noff;
  36.         struct iphdr *iph;
  37.         struct ipoe_session *ses;
  38.         unsigned char *cb_ptr;
  39. @@ -903,18 +890,6 @@
  40.         if (!ses)
  41.                 return NF_ACCEPT;
  42.  
  43. -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,32)
  44. -       iif = skb->skb_iif;
  45. -#else
  46. -       iif = skb->iif;
  47. -#endif
  48. -
  49. -       if (iif == ses->dev->ifindex) {
  50. -               atomic_dec(&ses->refs);
  51. -               return NF_ACCEPT;
  52. -       }
  53. -
  54. -       skb->dev = ses->dev;
  55.         atomic_dec(&ses->refs);
  56.  
  57.         return NF_ACCEPT;
Advertisement
Add Comment
Please, Sign In to add comment