ipt_TARPIT for Linux 2.6.20
PATCH 1/1 ipt_TARPIT for Linux 2.6.20
Patch for the function ip_direct_send() to compile on Linux 2.6.20.
Signed-off-by Max Kellermann <[email protected]>
TARPIT/linux-2.6/net/ipv4/netfilter/ipt_TARPIT.c +4 -9
@@ -60,16 +60,11 @@static int ip_direct_send (struct sk_buff *skb) {struct dst_entry *dst = skb->dst; -struct hh_cache *hh = dst->hh; -if (hh) { -read_lock_bh (&hh->hh_lock); -memcpy (skb->data -16 , hh->hh_data,16 ); -read_unlock_bh (&hh->hh_lock); -skb_push (skb, hh->hh_len); -return hh->hh_output (skb); - }else if (dst->neighbour) -return dst->neighbour->output (skb); +if (dst->hh) +return neigh_hh_output (dst->hh, skb); +else if (dst->neighbour) +return dst->neighbour->output (skb);if (net_ratelimit ())printk (KERN_DEBUG "TARPIT ip_direct_send: no header cache and no neighbor!\n" );
Patrick McHardy
AppliedQuoted 1 line · Max Kellermann
Patch for the function
ip_direct_send()to compile on Linux 2.6.20.
Applied, thanks.