netfilter: nf_nat: support IPv6 in amanda NAT helper
Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
Родитель
d33cbeeb1a
Коммит
ee6eb96673
|
@ -231,11 +231,6 @@ config NF_NAT_TFTP
|
||||||
depends on NF_CONNTRACK && NF_NAT_IPV4
|
depends on NF_CONNTRACK && NF_NAT_IPV4
|
||||||
default NF_NAT_IPV4 && NF_CONNTRACK_TFTP
|
default NF_NAT_IPV4 && NF_CONNTRACK_TFTP
|
||||||
|
|
||||||
config NF_NAT_AMANDA
|
|
||||||
tristate
|
|
||||||
depends on NF_CONNTRACK && NF_NAT_IPV4
|
|
||||||
default NF_NAT_IPV4 && NF_CONNTRACK_AMANDA
|
|
||||||
|
|
||||||
config NF_NAT_PPTP
|
config NF_NAT_PPTP
|
||||||
tristate
|
tristate
|
||||||
depends on NF_CONNTRACK && NF_NAT_IPV4
|
depends on NF_CONNTRACK && NF_NAT_IPV4
|
||||||
|
|
|
@ -20,7 +20,6 @@ obj-$(CONFIG_NF_NAT_IPV4) += nf_nat_ipv4.o
|
||||||
obj-$(CONFIG_NF_DEFRAG_IPV4) += nf_defrag_ipv4.o
|
obj-$(CONFIG_NF_DEFRAG_IPV4) += nf_defrag_ipv4.o
|
||||||
|
|
||||||
# NAT helpers (nf_conntrack)
|
# NAT helpers (nf_conntrack)
|
||||||
obj-$(CONFIG_NF_NAT_AMANDA) += nf_nat_amanda.o
|
|
||||||
obj-$(CONFIG_NF_NAT_H323) += nf_nat_h323.o
|
obj-$(CONFIG_NF_NAT_H323) += nf_nat_h323.o
|
||||||
obj-$(CONFIG_NF_NAT_IRC) += nf_nat_irc.o
|
obj-$(CONFIG_NF_NAT_IRC) += nf_nat_irc.o
|
||||||
obj-$(CONFIG_NF_NAT_PPTP) += nf_nat_pptp.o
|
obj-$(CONFIG_NF_NAT_PPTP) += nf_nat_pptp.o
|
||||||
|
|
|
@ -380,6 +380,11 @@ config NF_NAT_PROTO_SCTP
|
||||||
depends on NF_NAT && NF_CT_PROTO_SCTP
|
depends on NF_NAT && NF_CT_PROTO_SCTP
|
||||||
select LIBCRC32C
|
select LIBCRC32C
|
||||||
|
|
||||||
|
config NF_NAT_AMANDA
|
||||||
|
tristate
|
||||||
|
depends on NF_CONNTRACK && NF_NAT
|
||||||
|
default NF_NAT && NF_CONNTRACK_AMANDA
|
||||||
|
|
||||||
config NF_NAT_FTP
|
config NF_NAT_FTP
|
||||||
tristate
|
tristate
|
||||||
depends on NF_CONNTRACK && NF_NAT
|
depends on NF_CONNTRACK && NF_NAT
|
||||||
|
|
|
@ -55,6 +55,7 @@ obj-$(CONFIG_NF_NAT_PROTO_UDPLITE) += nf_nat_proto_udplite.o
|
||||||
obj-$(CONFIG_NF_NAT_PROTO_SCTP) += nf_nat_proto_sctp.o
|
obj-$(CONFIG_NF_NAT_PROTO_SCTP) += nf_nat_proto_sctp.o
|
||||||
|
|
||||||
# NAT helpers
|
# NAT helpers
|
||||||
|
obj-$(CONFIG_NF_NAT_AMANDA) += nf_nat_amanda.o
|
||||||
obj-$(CONFIG_NF_NAT_FTP) += nf_nat_ftp.o
|
obj-$(CONFIG_NF_NAT_FTP) += nf_nat_ftp.o
|
||||||
|
|
||||||
# transparent proxy support
|
# transparent proxy support
|
||||||
|
|
|
@ -155,8 +155,7 @@ static int amanda_help(struct sk_buff *skb,
|
||||||
IPPROTO_TCP, NULL, &port);
|
IPPROTO_TCP, NULL, &port);
|
||||||
|
|
||||||
nf_nat_amanda = rcu_dereference(nf_nat_amanda_hook);
|
nf_nat_amanda = rcu_dereference(nf_nat_amanda_hook);
|
||||||
if (nf_nat_amanda && nf_ct_l3num(ct) == NFPROTO_IPV4 &&
|
if (nf_nat_amanda && ct->status & IPS_NAT_MASK)
|
||||||
ct->status & IPS_NAT_MASK)
|
|
||||||
ret = nf_nat_amanda(skb, ctinfo, protoff,
|
ret = nf_nat_amanda(skb, ctinfo, protoff,
|
||||||
off - dataoff, len, exp);
|
off - dataoff, len, exp);
|
||||||
else if (nf_ct_expect_related(exp) != 0)
|
else if (nf_ct_expect_related(exp) != 0)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче