提交 352e04b9 编写于 作者: P Pablo Neira Ayuso 提交者: David S. Miller

netfilter: nf_ct_tcp, udp: fix compilation with sysctl disabled

This patch fixes the compilation of the TCP and UDP trackers with sysctl
compilation disabled:

net/netfilter/nf_conntrack_proto_udp.c: In function ‘udp_init_net_data’:
net/netfilter/nf_conntrack_proto_udp.c:279:13: error: ‘struct nf_proto_net’ has no member named
 ‘user’
net/netfilter/nf_conntrack_proto_tcp.c:1606:9: error: ‘struct nf_proto_net’ has no member named
 ‘user’
net/netfilter/nf_conntrack_proto_tcp.c:1643:9: error: ‘struct nf_proto_net’ has no member named
 ‘user’
Reported-by: NFengguang Wu <wfg@linux.intel.com>
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 9136461a
...@@ -1603,7 +1603,7 @@ static int tcpv4_init_net(struct net *net) ...@@ -1603,7 +1603,7 @@ static int tcpv4_init_net(struct net *net)
#ifdef CONFIG_SYSCTL #ifdef CONFIG_SYSCTL
if (!pn->ctl_table) { if (!pn->ctl_table) {
#else #else
if (!pn->user++) { if (!pn->users++) {
#endif #endif
for (i = 0; i < TCP_CONNTRACK_TIMEOUT_MAX; i++) for (i = 0; i < TCP_CONNTRACK_TIMEOUT_MAX; i++)
tn->timeouts[i] = tcp_timeouts[i]; tn->timeouts[i] = tcp_timeouts[i];
...@@ -1640,7 +1640,7 @@ static int tcpv6_init_net(struct net *net) ...@@ -1640,7 +1640,7 @@ static int tcpv6_init_net(struct net *net)
#ifdef CONFIG_SYSCTL #ifdef CONFIG_SYSCTL
if (!pn->ctl_table) { if (!pn->ctl_table) {
#else #else
if (!pn->user++) { if (!pn->users++) {
#endif #endif
for (i = 0; i < TCP_CONNTRACK_TIMEOUT_MAX; i++) for (i = 0; i < TCP_CONNTRACK_TIMEOUT_MAX; i++)
tn->timeouts[i] = tcp_timeouts[i]; tn->timeouts[i] = tcp_timeouts[i];
......
...@@ -276,7 +276,7 @@ static void udp_init_net_data(struct nf_udp_net *un) ...@@ -276,7 +276,7 @@ static void udp_init_net_data(struct nf_udp_net *un)
#ifdef CONFIG_SYSCTL #ifdef CONFIG_SYSCTL
if (!un->pn.ctl_table) { if (!un->pn.ctl_table) {
#else #else
if (!un->pn.user++) { if (!un->pn.users++) {
#endif #endif
for (i = 0; i < UDP_CT_MAX; i++) for (i = 0; i < UDP_CT_MAX; i++)
un->timeouts[i] = udp_timeouts[i]; un->timeouts[i] = udp_timeouts[i];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册