diff options
Diffstat (limited to 'ip6t_MAP66.c')
-rw-r--r-- | ip6t_MAP66.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/ip6t_MAP66.c b/ip6t_MAP66.c index fb0a243..6cae5af 100644 --- a/ip6t_MAP66.c +++ b/ip6t_MAP66.c @@ -15,7 +15,6 @@ MODULE_AUTHOR("Sven-Ola <sven-ola()gmx.de>"); MODULE_DESCRIPTION("Xtables: MAP66 - IPv6 to IPv6 SNAT"); MODULE_LICENSE("GPL"); -#undef MAP66_DEBUG #ifdef MAP66_DEBUG /* Use lock to serialize, so printks don't overlap */ static DEFINE_SPINLOCK(MAP66_lock); @@ -126,12 +125,12 @@ static unsigned int MAP66_tg6( #ifdef MAP66_DEBUG spin_lock_bh(&MAP66_lock); #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,28) - printk("MAP66i: in=%s, out=%s, saddr=" NIP6_FMT ", daddr=" NIP6_FMT "\n", + printk("MAP66: enter in=%s, out=%s, saddr=" NIP6_FMT ", daddr=" NIP6_FMT "\n", NULL != par->in ? par->in->name : "", NULL != par->out ? par->out->name : "", NIP6(hdr->saddr), NIP6(hdr->daddr)); #else - printk("MAP66i: in=%s, out=%s, saddr=%pI6, daddr=%pI6\n", + printk("MAP66: enter in=%s, out=%s, saddr=%pI6, daddr=%pI6\n", NULL != par->in ? par->in->name : "", NULL != par->out ? par->out->name : "", &hdr->saddr, &hdr->daddr); @@ -141,9 +140,9 @@ static unsigned int MAP66_tg6( switch(par->hooknum) { case NF_INET_PRE_ROUTING: #ifdef MAP66_DEBUG - printk("MAP66 PRE, spoof=%d\n", 0 != (IP6T_MAP66_OPT_NOSPOOF & info->mapflags)); + printk("MAP66 PRE, check=%d\n", 0 != (IP6T_MAP66_OPT_NOCHECK & info->mapflags)); #endif - if (0 != (IP6T_MAP66_OPT_NOSPOOF & info->mapflags) || + if (0 != (IP6T_MAP66_OPT_NOCHECK & info->mapflags) || !is_my_ipv6_addr(par->in, &hdr->daddr)) { map16(&hdr->daddr, info->prefixlength, &info->prefix, info->prefixcsum); @@ -151,10 +150,10 @@ static unsigned int MAP66_tg6( break; case NF_INET_POST_ROUTING: #ifdef MAP66_DEBUG - printk("MAP66 POST, spoof=%d\n", 0 != (IP6T_MAP66_OPT_NOSPOOF & info->mapflags)); + printk("MAP66 POST, check=%d\n", 0 != (IP6T_MAP66_OPT_NOCHECK & info->mapflags)); #endif map16(&hdr->saddr, info->prefixlength, &info->prefix, info->prefixcsum); - if (0 == (IP6T_MAP66_OPT_NOSPOOF & info->mapflags) && + if (0 == (IP6T_MAP66_OPT_NOCHECK & info->mapflags) && is_my_ipv6_addr(par->out, &hdr->saddr)) { #ifdef MAP66_DEBUG @@ -172,12 +171,12 @@ static unsigned int MAP66_tg6( #ifdef MAP66_DEBUG #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,28) - printk("MAP66i: in=%s, out=%s, saddr=" NIP6_FMT ", daddr=" NIP6_FMT "\n", + printk("MAP66: exit in=%s, out=%s, saddr=" NIP6_FMT ", daddr=" NIP6_FMT "\n", NULL != par->in ? par->in->name : "", NULL != par->out ? par->out->name : "", NIP6(hdr->saddr), NIP6(hdr->daddr)); #else - printk("MAP66i: in=%s, out=%s, saddr=%pI6, daddr=%pI6\n", + printk("MAP66: exit in=%s, out=%s, saddr=%pI6, daddr=%pI6\n", NULL != par->in ? par->in->name : "", NULL != par->out ? par->out->name : "", &hdr->saddr, &hdr->daddr); |