Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netfilter: nf_nat: support IPv6 in TFTP NAT helper

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>

+7 -8
-5
net/ipv4/netfilter/Kconfig
··· 221 221 tristate 222 222 depends on NF_NAT_IPV4 && NF_CT_PROTO_GRE 223 223 224 - config NF_NAT_TFTP 225 - tristate 226 - depends on NF_CONNTRACK && NF_NAT_IPV4 227 - default NF_NAT_IPV4 && NF_CONNTRACK_TFTP 228 - 229 224 config NF_NAT_PPTP 230 225 tristate 231 226 depends on NF_CONNTRACK && NF_NAT_IPV4
-1
net/ipv4/netfilter/Makefile
··· 23 23 obj-$(CONFIG_NF_NAT_H323) += nf_nat_h323.o 24 24 obj-$(CONFIG_NF_NAT_PPTP) += nf_nat_pptp.o 25 25 obj-$(CONFIG_NF_NAT_SNMP_BASIC) += nf_nat_snmp_basic.o 26 - obj-$(CONFIG_NF_NAT_TFTP) += nf_nat_tftp.o 27 26 28 27 # NAT protocols (nf_nat) 29 28 obj-$(CONFIG_NF_NAT_PROTO_GRE) += nf_nat_proto_gre.o
net/ipv4/netfilter/nf_nat_tftp.c net/netfilter/nf_nat_tftp.c
+5
net/netfilter/Kconfig
··· 400 400 depends on NF_CONNTRACK && NF_NAT 401 401 default NF_NAT && NF_CONNTRACK_SIP 402 402 403 + config NF_NAT_TFTP 404 + tristate 405 + depends on NF_CONNTRACK && NF_NAT 406 + default NF_NAT && NF_CONNTRACK_TFTP 407 + 403 408 endif # NF_CONNTRACK 404 409 405 410 # transparent proxy support
+1
net/netfilter/Makefile
··· 59 59 obj-$(CONFIG_NF_NAT_FTP) += nf_nat_ftp.o 60 60 obj-$(CONFIG_NF_NAT_IRC) += nf_nat_irc.o 61 61 obj-$(CONFIG_NF_NAT_SIP) += nf_nat_sip.o 62 + obj-$(CONFIG_NF_NAT_TFTP) += nf_nat_tftp.o 62 63 63 64 # transparent proxy support 64 65 obj-$(CONFIG_NETFILTER_TPROXY) += nf_tproxy_core.o
+1 -2
net/netfilter/nf_conntrack_tftp.c
··· 72 72 nf_ct_dump_tuple(&exp->tuple); 73 73 74 74 nf_nat_tftp = rcu_dereference(nf_nat_tftp_hook); 75 - if (nf_nat_tftp && nf_ct_l3num(ct) == NFPROTO_IPV4 && 76 - ct->status & IPS_NAT_MASK) 75 + if (nf_nat_tftp && ct->status & IPS_NAT_MASK) 77 76 ret = nf_nat_tftp(skb, ctinfo, exp); 78 77 else if (nf_ct_expect_related(exp) != 0) 79 78 ret = NF_DROP;