All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Jing Min Zhao <zhaojingmin@hotmail.com>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: [H.323 Helper 1/3]: Add support for Call Forwarding
Date: Wed, 26 Apr 2006 22:20:31 +0200	[thread overview]
Message-ID: <444FD60F.4060301@trash.net> (raw)
In-Reply-To: <BAY109-DAV107DE91F0E0B272EC778E4B3BC0@phx.gbl>

Jing Min Zhao wrote:
>>>>--- a/include/linux/netfilter_ipv4/ip_conntrack.h
>>>>+++ b/include/linux/netfilter_ipv4/ip_conntrack.h
>>>>@@ -154,6 +154,7 @@ struct ip_conntrack_expect
>>>>      unsigned int flags;
>>>>
>>>>#ifdef CONFIG_IP_NF_NAT_NEEDED
>>>>+       u_int32_t saved_ip;
>>>>      /* This is the original per-proto part, used to map the
>>>>       * expected connection the way the recipient expects. */
>>>>      union ip_conntrack_manip_proto saved_proto;
>>>>
>>>>Please explain why this is needed.
>>>>
>>>>
>>>
>>>If an external endpoint A calls an internal endpoint B, and B forwards 
>>>the call to an internal endpoint C, then the second call will come from 
>>>A, pass through firewall, and go to C. The current architecture assumes 
>>>any expected connections come back to the same internal endpoint, so 
>>>only the port (saved_proto) is saved. But in this case, it is not 
>>>enough - the expected connection will go to the third endpoint. So we 
>>>need to save not only C's port but also C's IP.
>>
>>OK, this seems to be unavoidable. But please just replace
>>ip_conntrack_manip_proto by ip_conntrack_manip.
>>
>>
> 
> 
> Do you mean to delete saved_ip and replace 
> "union ip_conntrack_manip_proto saved_proto" with 
> "struct ip_conntrack_manip saved_xxx"? This will break other code, 
> for example, ip_nat_follow_master(). Or I misunderstood.


Yes, these places need to be changes as well. But ip_conntrack_manip
is semantically correct, you use the saved_ip for the manip of the
new connection, so we can instead just save an entire manip.
But its still a good point, please make this change in a seperate patch
from the call forwarding patch.

  reply	other threads:[~2006-04-26 20:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-24  3:40 [H.323 Helper 1/3]: Add support for Call Forwarding Jing Min Zhao
2006-04-26 13:48 ` Patrick McHardy
2006-04-26 14:33   ` Jing Min Zhao
2006-04-26 16:49     ` Patrick McHardy
2006-04-26 18:06       ` Jing Min Zhao
2006-04-26 20:20         ` Patrick McHardy [this message]
2006-04-26 20:21         ` Patrick McHardy
2006-04-26 21:15           ` Jing Min Zhao
2006-04-27 19:57             ` Patrick McHardy
2006-04-28 15:07               ` Jing Min Zhao
2006-04-28 15:13                 ` Patrick McHardy
2006-05-20  3:23                   ` Patrick McHardy
2006-05-20  4:10                     ` Jing Min Zhao
2006-05-01 17:51         ` imap.netfilter.org (was Re: [H.323 Helper 1/3]: Add support for Call Forwarding) Harald Welte

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=444FD60F.4060301@trash.net \
    --to=kaber@trash.net \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=zhaojingmin@hotmail.com \
    /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.