提交 0127f777 编写于 作者: F Florian Westphal 提交者: Shile Zhang

netfilter: conntrack: udp: set stream timeout to 2 minutes

commit 294304e4c522d797b7ea8200ab74354843fa68e9 upstream

We have no explicit signal when a UDP stream has terminated, peers just
stop sending.

For suspected stream connections a timeout of two minutes is sane to keep
NAT mapping alive a while longer.

It matches tcp conntracks 'timewait' default timeout value.
Signed-off-by: NFlorian Westphal <fw@strlen.de>
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: NTony Lu <tonylu@linux.alibaba.com>
Acked-by: NDust Li <dust.li@linux.alibaba.com>
上级 617c7456
...@@ -157,7 +157,7 @@ nf_conntrack_udp_timeout - INTEGER (seconds) ...@@ -157,7 +157,7 @@ nf_conntrack_udp_timeout - INTEGER (seconds)
default 30 default 30
nf_conntrack_udp_timeout_stream - INTEGER (seconds) nf_conntrack_udp_timeout_stream - INTEGER (seconds)
default 180 default 120
This extended timeout will be used in case there is an UDP stream This extended timeout will be used in case there is an UDP stream
detected. detected.
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
static const unsigned int udp_timeouts[UDP_CT_MAX] = { static const unsigned int udp_timeouts[UDP_CT_MAX] = {
[UDP_CT_UNREPLIED] = 30*HZ, [UDP_CT_UNREPLIED] = 30*HZ,
[UDP_CT_REPLIED] = 180*HZ, [UDP_CT_REPLIED] = 120*HZ,
}; };
static inline struct nf_udp_net *udp_pernet(struct net *net) static inline struct nf_udp_net *udp_pernet(struct net *net)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册