~ubuntu-branches/ubuntu/lucid/xtables-addons/lucid

« back to all changes in this revision

Viewing changes to extensions/xt_TEE.c

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Chifflier
  • Date: 2009-09-10 21:42:05 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090910214205-neqgwq7y5nctaty7
Tags: 1.18-1
* New Upstream Version
  This version has support for 2.6.31 (Closes: #545542)
* Bump standards version (no changes)
* Depend on quilt (Closes: #533653)

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
                return false;
80
80
        }
81
81
 
82
 
        dst_release(skb->dst);
83
 
        skb->dst      = &rt->u.dst;
84
 
        skb->dev      = skb->dst->dev;
 
82
        dst_release(skb_dst(skb));
 
83
        skb_dst_set(skb, &rt->u.dst);
 
84
        skb->dev      = rt->u.dst.dev;
85
85
        skb->protocol = htons(ETH_P_IP);
86
86
        return true;
87
87
}
104
104
 */
105
105
static void tee_tg_send(struct sk_buff *skb)
106
106
{
107
 
        const struct dst_entry *dst  = skb->dst;
 
107
        const struct dst_entry *dst  = skb_dst(skb);
108
108
        const struct net_device *dev = dst->dev;
109
109
        unsigned int hh_len = LL_RESERVED_SPACE(dev);
110
110
 
175
175
        /*
176
176
         * Copy the skb, and route the copy. Will later return %XT_CONTINUE for
177
177
         * the original skb, which should continue on its way as if nothing has
178
 
         * happened. The copy should be independantly delivered to the TEE --gw.
 
178
         * happened. The copy should be independently delivered to the TEE --gw.
179
179
         */
180
180
        skb = skb_copy(skb, GFP_ATOMIC);
181
181
        if (skb == NULL) {
251
251
                return false;
252
252
        }
253
253
 
254
 
        dst_release(skb->dst);
255
 
        skb->dst      = dst;
256
 
        skb->dev      = skb->dst->dev;
 
254
        dst_release(skb_dst(skb));
 
255
        skb_dst_set(skb, dst);
 
256
        skb->dev      = dst->dev;
257
257
        skb->protocol = htons(ETH_P_IPV6);
258
258
        return true;
259
259
}