lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 13 Jun 2012 16:51:03 +0800
From:	Gao feng <gaofeng@...fujitsu.com>
To:	Pablo Neira Ayuso <pablo@...filter.org>
CC:	David Miller <davem@...emloft.net>, wfg@...ux.intel.com,
	netdev@...r.kernel.org
Subject: Re: net/netfilter/nf_conntrack_proto_tcp.c:1606:9: error: ‘struct nf_proto_net’ has no member named ‘user’

于 2012年06月13日 00:03, Pablo Neira Ayuso 写道:
> Still, we have that pn->users thing:
> 
>         if (!pn->users++) {
>                 for (i = 0; i < TCP_CONNTRACK_TIMEOUT_MAX; i++)
>                         tn->timeouts[i] = tcp_timeouts[i];
> 
>                 tn->tcp_loose = nf_ct_tcp_loose;
>                 tn->tcp_be_liberal = nf_ct_tcp_be_liberal;
>                 tn->tcp_max_retrans = nf_ct_tcp_max_retrans;
>         }
> 
> Define some pn->initialized boolean. Set it to true at the end of
> the new tcp_init_net.

It should not be boolean,because We don't know what's the right time to set it false.
Just like nf_conntrack_l4proto_tcp(4,6), they both use nf_tcp_net,we can set it false
only when tcp4 and tcp6 are unregistered, so we need a referenct count here to point
out if one proto has initialied the nf_tcp_net, or if there are no protos use nf_tcp_net.

Though it maybe confusing,we can regard it as the reference count of nf_proto_net(how
many protos are using nf_proto_net), and this reference count is increased when
l4proto being registered success(no matter sysctl is enabled or disabled).
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ