From: Patrick McHardy <kaber@trash.net>
To: Jan Engelhardt <jengelh@computergmbh.de>
Cc: Netfilter Developer Mailing List <netfilter-devel@vger.kernel.org>
Subject: Re: nf_nat_core just using l3proto_find_get
Date: Mon, 17 Mar 2008 15:01:33 +0100 [thread overview]
Message-ID: <47DE79BD.1070401@trash.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0803112041330.18745@fbirervta.pbzchgretzou.qr>
Jan Engelhardt wrote:
> I see — so this patch is needed, seems like it?
>
> ===
> commit 0d3f177a94aadedf9fd26f230d473e636eb0553c
> Author: Jan Engelhardt <jengelh@computergmbh.de>
> Date: Tue Mar 11 20:40:05 2008 +0100
>
> [NETFILTER]: nf_nat: autoload IPv4 connection tracking
>
> Without this patch, the generic L3 tracker would kick in
> if nf_conntrack_ipv4 was not loaded before nf_nat, which
> would lead to translation problems with ICMP errors.
>
> Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
>
> diff --git a/net/ipv4/netfilter/nf_nat_core.c b/net/ipv4/netfilter/nf_nat_core.c
> index 9c8aa8d..a9de065 100644
> --- a/net/ipv4/netfilter/nf_nat_core.c
> +++ b/net/ipv4/netfilter/nf_nat_core.c
> @@ -657,7 +657,12 @@ static int __init nf_nat_init(void)
> /* Initialize fake conntrack so that NAT will skip it */
> nf_conntrack_untracked.status |= IPS_NAT_DONE_MASK;
>
> - l3proto = nf_ct_l3proto_find_get((u_int16_t)AF_INET);
> + if (nf_ct_l3proto_try_module_get(AF_INET) < 0)
> + printk(KERN_INFO KBUILD_MODNAME ": Could not load connection "
> + "tracking for l3proto %u, using generic L3 tracking "
> + "only.\n", AF_INET);
> +
> + l3proto = __nf_ct_l3proto_find(AF_INET);
Actually I think this should be a hard error, NAT doesn't
work without IPv4 conntrack. The easiest fix seems to add
a need_ipv4_conntrack() "call" to the init function.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2008-03-17 14:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-08 2:10 nf_nat_core just using l3proto_find_get Jan Engelhardt
2008-02-19 12:22 ` Patrick McHardy
2008-03-10 22:01 ` Jan Engelhardt
2008-03-11 14:05 ` Patrick McHardy
2008-03-11 14:16 ` Jan Engelhardt
2008-03-11 14:20 ` Patrick McHardy
2008-03-11 19:42 ` Jan Engelhardt
2008-03-17 14:01 ` Patrick McHardy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47DE79BD.1070401@trash.net \
--to=kaber@trash.net \
--cc=jengelh@computergmbh.de \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.