<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/ctdb/protocol, branch talloc-2.3.0</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/'/>
<entry>
<title>ctdb-protocol: Avoid signed/unsigned comparison by casting</title>
<updated>2019-07-05T05:03:24+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2019-06-23T11:00:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=2a93385997912c89fa6b547f8c32fa67283403cb'/>
<id>2a93385997912c89fa6b547f8c32fa67283403cb</id>
<content type='text'>
Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-protocol: Variable for return value of strlcpy() should be size_t</title>
<updated>2019-07-05T05:03:24+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2019-06-23T10:59:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=3f388076203c5d3c77ebb66e10d4c2bd6b7cedc7'/>
<id>3f388076203c5d3c77ebb66e10d4c2bd6b7cedc7</id>
<content type='text'>
This avoids an unnecessary signed/unsigned comparison issue.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This avoids an unnecessary signed/unsigned comparison issue.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-protocol: Fix signed/unsigned comparison by declaring as unsigned</title>
<updated>2019-07-05T05:03:24+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2019-06-26T06:14:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=248d585ab420ef837001fa9a882101b209bae7d3'/>
<id>248d585ab420ef837001fa9a882101b209bae7d3</id>
<content type='text'>
Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-protocol: Do not ignore return value of ctdb_g_lock_pull()</title>
<updated>2019-07-05T05:03:24+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2019-06-07T14:04:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=4f84aafa61cad21ba77b86f3341c09e0314e8b47'/>
<id>4f84aafa61cad21ba77b86f3341c09e0314e8b47</id>
<content type='text'>
clang reports:

  ctdb/protocol/protocol_types.c:5191:3: warning: Value stored to 'ret' is never read

Found by csbuild.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
clang reports:

  ctdb/protocol/protocol_types.c:5191:3: warning: Value stored to 'ret' is never read

Found by csbuild.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb: Update all consumers of strtoul_err(), strtoull_err() to new API</title>
<updated>2019-06-30T11:32:18+00:00</updated>
<author>
<name>Swen Schillig</name>
<email>swen@linux.ibm.com</email>
</author>
<published>2019-04-12T14:58:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=73640b8ad8ced213d4855a2698df0d15318696ac'/>
<id>73640b8ad8ced213d4855a2698df0d15318696ac</id>
<content type='text'>
Signed-off-by: Swen Schillig &lt;swen@linux.ibm.com&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Christof Schmitt &lt;cs@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Swen Schillig &lt;swen@linux.ibm.com&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Christof Schmitt &lt;cs@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb:protocol_util: remove 'const' from allocated strings</title>
<updated>2019-06-04T22:13:07+00:00</updated>
<author>
<name>Stefan Metzmacher</name>
<email>metze@samba.org</email>
</author>
<published>2019-05-27T10:31:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=3ce9069a65c5e943c6eda38711f527a9a42c7b6b'/>
<id>3ce9069a65c5e943c6eda38711f527a9a42c7b6b</id>
<content type='text'>
The caller should be able to call TALLOC_FREE() on the returned
strings.

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The caller should be able to call TALLOC_FREE() on the returned
strings.

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-protocol: Update error check for new string conversion wrapper</title>
<updated>2019-04-11T22:29:26+00:00</updated>
<author>
<name>Swen Schillig</name>
<email>swen@linux.ibm.com</email>
</author>
<published>2019-03-06T08:43:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=c0c1004cd0946b9ead9b2441794dc9268af60fd8'/>
<id>c0c1004cd0946b9ead9b2441794dc9268af60fd8</id>
<content type='text'>
The new string conversion wrappers detect and flag errors
which occured during the string to integer conversion.
Those modifications required an update of the callees
error checks.

Signed-off-by: Swen Schillig &lt;swen@linux.ibm.com&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Christof Schmitt &lt;cs@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The new string conversion wrappers detect and flag errors
which occured during the string to integer conversion.
Those modifications required an update of the callees
error checks.

Signed-off-by: Swen Schillig &lt;swen@linux.ibm.com&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Christof Schmitt &lt;cs@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb: Initialize addr struct to zero before reparsing as IPV4</title>
<updated>2019-03-15T05:17:13+00:00</updated>
<author>
<name>Zhu Shangzhong</name>
<email>zhu.shangzhong@zte.com.cn</email>
</author>
<published>2019-03-12T12:49:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=539b5ff32b32b7c75dfaaa119e41f5af6ff1e6fc'/>
<id>539b5ff32b32b7c75dfaaa119e41f5af6ff1e6fc</id>
<content type='text'>
Failed to kill the tcp connection that using IPv4-mapped IPv6 address
(e.g. ctdb_killtcp eth0 ::ffff:192.168.200.44:2049
::ffff:192.168.200.45:863).

When the ctdb_killtcp is used to kill the tcp connection, the IPs and
ports in the connection will be parsed to conn.client and conn.server
(call stack: main-&gt;ctdb_sock_addr_from_string-&gt;ip_from_string). In
the ip_from_string, as we are using IPv4-mapped IPv6 addresses, the
ipv6_from_string will be used to parse ip to addr.ip6 first. The next
step the ipv4_from_string will be used to reparse ip to addr.ip.

As a result, the data that dump from conn.server is "2 0 8 1 192 168
200 44 0 0 0 0 0 0 0 0 0 0 255 255 192 168 200 44 0 0 0 0", the data
from conn.client is "2 0 3 95 192 168 200 45 0 0 0 0 0 0 0 0 0 0 255 255
192 168 200 45 0 0 0 0". The connection will be add to conn_list by
ctdb_connection_list_add. Then the reset_connections_send uses conn_list
as parameter to start to reset connections in the conn_list.

In the reset_connections_send, the database "connections" will be
created. The connections from conn_list will be written to the
database(call db_hash_add), and use the data that dump from conn_client
and conn_server as key.

In the reset_connections_capture_tcp_handler, the
ctdb_sys_read_tcp_packet will receive data on the raw socket. And
extract the IPs and ports from the tcp packet. when extracting IP and
port, the tcp4_extract OR tcp6_extract will be used. Then we got the
new conn.client and conn.server. the data that dump from the
conn.server is "2 0 8 1 192 168 200 44 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0", the data from conn.client is "2 0 3 95 192 168 200 45 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0". Finally, we use the data as key to check
if this connection is one being reset(call db_hash_delete). The
db_hash_delete will return ENOENT. Because the two key that being used
by db_hash_delete and db_hash_add are different.

So, the TCP RST will be NOT sent for the connection forever. We should
initialize addr struct to zero before reparsing as IPV4 in the
ip_from_string.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13839

Signed-off-by: Zhu Shangzhong &lt;zhu.shangzhong@zte.com.cn&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Failed to kill the tcp connection that using IPv4-mapped IPv6 address
(e.g. ctdb_killtcp eth0 ::ffff:192.168.200.44:2049
::ffff:192.168.200.45:863).

When the ctdb_killtcp is used to kill the tcp connection, the IPs and
ports in the connection will be parsed to conn.client and conn.server
(call stack: main-&gt;ctdb_sock_addr_from_string-&gt;ip_from_string). In
the ip_from_string, as we are using IPv4-mapped IPv6 addresses, the
ipv6_from_string will be used to parse ip to addr.ip6 first. The next
step the ipv4_from_string will be used to reparse ip to addr.ip.

As a result, the data that dump from conn.server is "2 0 8 1 192 168
200 44 0 0 0 0 0 0 0 0 0 0 255 255 192 168 200 44 0 0 0 0", the data
from conn.client is "2 0 3 95 192 168 200 45 0 0 0 0 0 0 0 0 0 0 255 255
192 168 200 45 0 0 0 0". The connection will be add to conn_list by
ctdb_connection_list_add. Then the reset_connections_send uses conn_list
as parameter to start to reset connections in the conn_list.

In the reset_connections_send, the database "connections" will be
created. The connections from conn_list will be written to the
database(call db_hash_add), and use the data that dump from conn_client
and conn_server as key.

In the reset_connections_capture_tcp_handler, the
ctdb_sys_read_tcp_packet will receive data on the raw socket. And
extract the IPs and ports from the tcp packet. when extracting IP and
port, the tcp4_extract OR tcp6_extract will be used. Then we got the
new conn.client and conn.server. the data that dump from the
conn.server is "2 0 8 1 192 168 200 44 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0", the data from conn.client is "2 0 3 95 192 168 200 45 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0". Finally, we use the data as key to check
if this connection is one being reset(call db_hash_delete). The
db_hash_delete will return ENOENT. Because the two key that being used
by db_hash_delete and db_hash_add are different.

So, the TCP RST will be NOT sent for the connection forever. We should
initialize addr struct to zero before reparsing as IPV4 in the
ip_from_string.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13839

Signed-off-by: Zhu Shangzhong &lt;zhu.shangzhong@zte.com.cn&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-protocol: Use wrapper for string to integer conversion</title>
<updated>2019-03-01T00:32:10+00:00</updated>
<author>
<name>Swen Schillig</name>
<email>swen@linux.ibm.com</email>
</author>
<published>2019-01-29T12:03:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=e96bccc879a675856b3a875db2d718445410caea'/>
<id>e96bccc879a675856b3a875db2d718445410caea</id>
<content type='text'>
In order to detect an value overflow error during
the string to integer conversion with strtoul/strtoull,
the errno variable must be set to zero before the execution and
checked after the conversion is performed. This is achieved by
using the wrapper function strtoul_err and strtoull_err.

Signed-off-by: Swen Schillig &lt;swen@linux.ibm.com&gt;
Reviewed-by: Ralph Böhme &lt;slow@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In order to detect an value overflow error during
the string to integer conversion with strtoul/strtoull,
the errno variable must be set to zero before the execution and
checked after the conversion is performed. This is achieved by
using the wrapper function strtoul_err and strtoull_err.

Signed-off-by: Swen Schillig &lt;swen@linux.ibm.com&gt;
Reviewed-by: Ralph Böhme &lt;slow@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-protocol: Drop marshalling code for RECEIVE_RECORDS control</title>
<updated>2018-10-08T00:46:21+00:00</updated>
<author>
<name>Amitay Isaacs</name>
<email>amitay@gmail.com</email>
</author>
<published>2018-02-15T01:21:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=2f89bd96fb6c5e50cfc09604ceb6b96a94cb4f56'/>
<id>2f89bd96fb6c5e50cfc09604ceb6b96a94cb4f56</id>
<content type='text'>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13641

Signed-off-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13641

Signed-off-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
