12 #include <linux/kernel.h>
13 #include <linux/module.h>
14 #include <linux/netdevice.h>
15 #include <linux/ipv6.h>
16 #include <linux/netfilter.h>
17 #include <linux/netfilter_ipv6.h>
18 #include <linux/netfilter/x_tables.h>
32 ct = nf_ct_get(skb, &ctinfo);
40 nfct_nat(ct)->masq_index = par->
out->ifindex;
43 newrange.min_addr.in6 =
src;
44 newrange.max_addr.in6 =
src;
51 static int masquerade_tg6_checkentry(
const struct xt_tgchk_param *par)
60 static int device_cmp(
struct nf_conn *ct,
void *ifindex)
68 return nat->masq_index == (
int)(
long)ifindex;
75 struct net *
net = dev_net(dev);
85 .notifier_call = masq_device_event,
89 unsigned long event,
void *ptr)
93 return masq_device_event(
this, event, ifa->
idev->dev);
97 .notifier_call = masq_inet_event,
101 .name =
"MASQUERADE",
103 .checkentry = masquerade_tg6_checkentry,
104 .target = masquerade_tg6,
111 static int __init masquerade_tg6_init(
void)
123 static void __exit masquerade_tg6_exit(
void)