diff options
Diffstat (limited to 'ip6t_MAP66.c')
-rw-r--r-- | ip6t_MAP66.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/ip6t_MAP66.c b/ip6t_MAP66.c index 6cae5af..457bd5e 100644 --- a/ip6t_MAP66.c +++ b/ip6t_MAP66.c @@ -15,11 +15,6 @@ MODULE_AUTHOR("Sven-Ola <sven-ola()gmx.de>"); MODULE_DESCRIPTION("Xtables: MAP66 - IPv6 to IPv6 SNAT"); MODULE_LICENSE("GPL"); -#ifdef MAP66_DEBUG -/* Use lock to serialize, so printks don't overlap */ -static DEFINE_SPINLOCK(MAP66_lock); -#endif - /* One's complement add */ static inline u_int16_t add16( u_int16_t a, @@ -120,10 +115,9 @@ static unsigned int MAP66_tg6( const struct xt_target_param *par) { struct ipv6hdr *hdr = ipv6_hdr(skb); - const struct ip6t_MAP66_info *info = (const struct ip6t_MAP66_info *)par->targinfo; + const struct ip6t_MAP66_info *info = par->targinfo; #ifdef MAP66_DEBUG - spin_lock_bh(&MAP66_lock); #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,28) printk("MAP66: enter in=%s, out=%s, saddr=" NIP6_FMT ", daddr=" NIP6_FMT "\n", NULL != par->in ? par->in->name : "", @@ -156,9 +150,6 @@ static unsigned int MAP66_tg6( if (0 == (IP6T_MAP66_OPT_NOCHECK & info->mapflags) && is_my_ipv6_addr(par->out, &hdr->saddr)) { -#ifdef MAP66_DEBUG - spin_unlock_bh(&MAP66_lock); -#endif return NF_DROP; } break; @@ -181,7 +172,6 @@ static unsigned int MAP66_tg6( NULL != par->out ? par->out->name : "", &hdr->saddr, &hdr->daddr); #endif - spin_unlock_bh(&MAP66_lock); #endif return IP6T_CONTINUE; @@ -190,7 +180,7 @@ static unsigned int MAP66_tg6( static bool MAP66_tg6_check( const struct xt_tgchk_param *par) { - const struct ip6t_MAP66_info *info = (const struct ip6t_MAP66_info *)par->targinfo; + const struct ip6t_MAP66_info *info = par->targinfo; if (0 >= info->prefixlength || 8 <= info->prefixlength) { printk("MAP66: Unsupported prefix length /%d\n", 16 * info->prefixlength); |