]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
build: avoid use of unexported functions
authorJan Engelhardt <jengelh@inai.de>
Mon, 16 Jul 2012 03:36:41 +0000 (05:36 +0200)
committerJan Engelhardt <jengelh@inai.de>
Mon, 16 Jul 2012 03:36:41 +0000 (05:36 +0200)
Fixes: "WARNING 'ipv6_find_hdr' [xt_TARPIT.ko] not found" in
<= linux-2.6.37.

doc/changelog.txt
extensions/xt_TARPIT.c

index 01935459ce868d96dd5f55b78e5d74bc0e32362d..bef61884e02d5623d6c8d801bf08ca93745bba61 100644 (file)
@@ -4,6 +4,9 @@ HEAD
 Fixes:
 - build: export missing functions
   (fixes: "WARNING 'xtnu_ipv6_find_hdr' [xt_TARPIT.ko] not found")
+- build: avoid use of unexported functions
+  (fixes: "WARNING 'ipv6_find_hdr' [xt_TARPIT.ko] not found"
+  in <= linux-2.6.37)
 
 
 v1.44 (2012-07-15)
index f9d89e63fbf36a554995ce4f4a2f78dbd0a02e96..58f12e4b5346a7a7f61c4f286d4cdaa841ee7a75 100644 (file)
@@ -374,16 +374,15 @@ static void tarpit_tcp6(struct sk_buff *oldskb, unsigned int hook,
        ip6h->daddr = oip6h->saddr;
 
        /* Adjust IP TTL */
-       if (mode == XTTARPIT_HONEYPOT)
+       if (mode == XTTARPIT_HONEYPOT) {
                ip6h->hop_limit = 128;
-       else
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
+       } else {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)
                ip6h->hop_limit = ip6_dst_hoplimit(skb_dst(nskb));
 #else
-               ip6h->hop_limit = dst_metric(dst, RTAX_HOPLIMIT);
-               if (ip6h->hop_limit < 0)
-                       ip6h->hop_limit = ipv6_get_hoplimit((skb_dst(nskb))->dev).
+               ip6h->hop_limit = dst_metric(skb_dst(nskb), RTAX_HOPLIMIT);
 #endif
+       }
 
        tcph = (struct tcphdr *)(skb_network_header(nskb) +
               sizeof(struct ipv6hdr));