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

« back to all changes in this revision

Viewing changes to extensions/xt_TARPIT.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:
167
167
        nskb->ip_summed = CHECKSUM_NONE;
168
168
 
169
169
        /* Adjust IP TTL */
170
 
        niph->ttl = dst_metric(nskb->dst, RTAX_HOPLIMIT);
 
170
        niph->ttl = dst_metric(skb_dst(nskb), RTAX_HOPLIMIT);
171
171
 
172
172
        /* Adjust IP checksum */
173
173
        niph->check = 0;
174
174
        niph->check = ip_fast_csum(skb_network_header(nskb), niph->ihl);
175
175
 
176
176
        /* "Never happens" */
177
 
        if (nskb->len > dst_mtu(nskb->dst))
 
177
        if (nskb->len > dst_mtu(skb_dst(nskb)))
178
178
                goto free_nskb;
179
179
 
180
180
        nf_ct_attach(nskb, oldskb);
181
181
 
182
 
        NF_HOOK(NFPROTO_IPV4, NF_INET_LOCAL_OUT, nskb, NULL, nskb->dst->dev,
183
 
                dst_output);
 
182
        NF_HOOK(NFPROTO_IPV4, NF_INET_LOCAL_OUT, nskb, NULL,
 
183
                skb_dst(nskb)->dev, dst_output);
184
184
        return;
185
185
 
186
186
 free_nskb:
192
192
{
193
193
        const struct sk_buff *skb = *pskb;
194
194
        const struct iphdr *iph = ip_hdr(skb);
195
 
        const struct rtable *rt = (const void *)skb->dst;
 
195
        const struct rtable *rt = skb_rtable(skb);
196
196
 
197
197
        /* Do we have an input route cache entry? (Not in PREROUTING.) */
198
198
        if (rt == NULL)