Support for Linux 2.6.17

This commit is contained in:
Jan Engelhardt
2008-09-22 13:40:25 -04:00
parent 9c43965a86
commit f3f0741469
6 changed files with 22 additions and 9 deletions

View File

@@ -52,7 +52,7 @@
static void tarpit_tcp(struct sk_buff *oldskb, unsigned int hook)
{
struct tcphdr _otcph, *oth, *tcph;
unsigned int addr_type;
unsigned int addr_type = RTN_UNSPEC;
struct sk_buff *nskb;
struct iphdr *niph;
u_int16_t tmp;
@@ -96,9 +96,11 @@ static void tarpit_tcp(struct sk_buff *oldskb, unsigned int hook)
skb_nfmark(nskb) = 0;
skb_init_secmark(nskb);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 18)
skb_shinfo(nskb)->gso_size = 0;
skb_shinfo(nskb)->gso_segs = 0;
skb_shinfo(nskb)->gso_type = 0;
#endif
tcph = (struct tcphdr *)(skb_network_header(nskb) + ip_hdrlen(nskb));