Message ID | 20120611221521.GA27239@1984 |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Pablo Neira Ayuso <pablo@netfilter.org> Date: Tue, 12 Jun 2012 00:15:21 +0200 > Could you please apply the following patch to net-next to resolve > this? Thanks. Applied, but you have to be kidding me with those ifdefs. This is exactly the same kind of thing Gao suggested for the inetpeer code recently and which I flat out rejected. You can't pepper foo.c files with ifdefs all over the place. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Jun 11, 2012 at 03:23:44PM -0700, David Miller wrote: > From: Pablo Neira Ayuso <pablo@netfilter.org> > Date: Tue, 12 Jun 2012 00:15:21 +0200 > > > Could you please apply the following patch to net-next to resolve > > this? Thanks. > > Applied, but you have to be kidding me with those ifdefs. > > This is exactly the same kind of thing Gao suggested for > the inetpeer code recently and which I flat out rejected. Yes, this doesn't look nice at all... > You can't pepper foo.c files with ifdefs all over the place. I'll send patches to improve the current situation. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From 66325515b2c4b3f112d81da03ac9f1018577c9cf Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso <pablo@netfilter.org> Date: Mon, 11 Jun 2012 23:58:01 +0200 Subject: [PATCH] netfilter: nf_ct_tcp, udp: fix compilation with sysctl disabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Fengguang Wu <wfg@linux.intel.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> --- net/netfilter/nf_conntrack_proto_tcp.c | 4 ++-- net/netfilter/nf_conntrack_proto_udp.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c index 1cff854..99caa13 100644 --- a/net/netfilter/nf_conntrack_proto_tcp.c +++ b/net/netfilter/nf_conntrack_proto_tcp.c @@ -1603,7 +1603,7 @@ static int tcpv4_init_net(struct net *net) #ifdef CONFIG_SYSCTL if (!pn->ctl_table) { #else - if (!pn->user++) { + if (!pn->users++) { #endif for (i = 0; i < TCP_CONNTRACK_TIMEOUT_MAX; i++) tn->timeouts[i] = tcp_timeouts[i]; @@ -1640,7 +1640,7 @@ static int tcpv6_init_net(struct net *net) #ifdef CONFIG_SYSCTL if (!pn->ctl_table) { #else - if (!pn->user++) { + if (!pn->users++) { #endif for (i = 0; i < TCP_CONNTRACK_TIMEOUT_MAX; i++) tn->timeouts[i] = tcp_timeouts[i]; diff --git a/net/netfilter/nf_conntrack_proto_udp.c b/net/netfilter/nf_conntrack_proto_udp.c index 360565a..a83cf93 100644 --- a/net/netfilter/nf_conntrack_proto_udp.c +++ b/net/netfilter/nf_conntrack_proto_udp.c @@ -276,7 +276,7 @@ static void udp_init_net_data(struct nf_udp_net *un) #ifdef CONFIG_SYSCTL if (!un->pn.ctl_table) { #else - if (!un->pn.user++) { + if (!un->pn.users++) { #endif for (i = 0; i < UDP_CT_MAX; i++) un->timeouts[i] = udp_timeouts[i]; -- 1.7.10