1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

39 Commits

Author SHA1 Message Date
Amitay Isaacs
d9030d8c10 ctdb-system: Remove unused system specific calls
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2015-08-07 05:33:29 +02:00
Volker Lendecke
621bd07842 ctdb: Fix 1125553 Buffer not null terminated
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2015-03-10 21:48:03 +01:00
Martin Schwenke
7f3f3b15d5 ctdb-daemon: Gratuitous ARP equivalent for IPv6 is neighbor advertisement
Not neighbour solicitation.  See:

  https://tools.ietf.org/html/rfc4861#section-4.4

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-12-05 21:02:41 +01:00
Amitay Isaacs
7562701153 ctdb-common: Coverity fixes
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-11-19 17:13:05 +01:00
Amitay Isaacs
3c0a477911 common: Null terminate process name string so valgrind doesn't complain
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 1c9025fdd08d1cea342af7487d0123015e08831b)
2013-08-14 16:55:51 +10:00
Sumit Bose
3dc280f5b0 IPv6 neighbor solicit cleanup
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit a81edf7eb908659a379f0cb55fd5d04551dc2c37)
2013-07-11 15:16:55 +10:00
Amitay Isaacs
500b26e48f common/system: Add ctdb_set_process_name() function
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit fc3689c977f48d7988eed0654fb8e5ce4b8bfc8b)
2013-07-10 14:33:19 +10:00
Amitay Isaacs
1011d10a51 common: Add routines to get process and lock information
Currently these functions are implemented only for Linux.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit be4051326b0c6a0fd301561af10fd15a0e90023b)
2012-10-20 02:48:44 +11:00
Amitay Isaacs
4392591555 Remove explicit include of lib/tevent/tevent.h.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 0681014ca5ed2a9b56f63fdace7f894beccf8a9a)
2012-04-13 17:28:14 +10:00
Ronnie Sahlberg
c3ee62439f Return the peer_pid properly to the caller
(This used to be ctdb commit 0f15a2c65db8f8b4ac0d5ad2755b9aa3c2a8b279)
2011-12-06 13:16:15 +11:00
Mathieu Parent
bb3d6698e9 Move platform-specific code to common/system_*
This removes #ifdef AIX and ease the addition of new platforms.

(This used to be ctdb commit 2fd1067a075fe0e4b2a36d4ea18af139d03f17bf)
2011-12-06 11:57:11 +11:00
Michael Adam
5d94dff27e system_linux: correctly cast sockaddr_in6 to sockaddr for sendto() in ctdb_sys_send_tcp()
(This used to be ctdb commit 11bebd5367102fcd02b17c44ac87bf50d4c68785)
2011-11-26 00:34:54 +01:00
Michael Adam
d9516a8bf9 system_linux: correctly cast sockaddr_in to sockaddr in ctdb_sys_send_tcp()
(This used to be ctdb commit cc60df5a3edebfdf50fcd22ebfaad35736f90379)
2011-11-26 00:34:54 +01:00
Ronnie Sahlberg
64378fea58 Check interfaces: when reading the public addresses file to create the vnn list
check that the actual interface exist, print error and fail startup if the interface does not exist.

(This used to be ctdb commit cd33bbe6454b7b0316bdfffbd06c67b29779e873)
2011-09-06 16:11:00 +10:00
Rusty Russell
f93440c4b7 event: Update events to latest Samba version 0.9.8
In Samba this is now called "tevent", and while we use the backwards
compatibility wrappers they don't offer EVENT_FD_AUTOCLOSE: that is now
a separate tevent_fd_set_auto_close() function.

This is based on Samba version 7f29f817fa.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>


(This used to be ctdb commit 85e5e760cc91eb3157d3a88996ce474491646726)
2010-08-18 09:16:31 +09:30
Ronnie Sahlberg
d7c00d8d7e Drop the debug level for logging fd creation to DEBUG_DEBUG
(This used to be ctdb commit eae1d4f9e52e73b4d8769868fffdafa590d03784)
2010-02-04 06:37:41 +11:00
Ronnie Sahlberg
a92ba7f729 lower the debug levels for the "create FD messages" so we dont fill up the logs.
(This used to be ctdb commit 87146db2769c2ec494813685bf9cec0d2a6336c3)
2009-10-21 15:26:24 +11:00
Ronnie Sahlberg
9de3652380 add logging everytime we create a filedescriptor in the main ctdb daemon
so we can spot if there are leaks.

plug two leaks for filedescriptors related to when sending ARP fail
and one leak when we can not parse the local address during tcp connection establish

(This used to be ctdb commit ddd089810a14efe4be6e1ff3eccaa604e4913c9e)
2009-10-15 11:24:54 +11:00
Ronnie Sahlberg
9921e1ec21 change the socket we use for sending grautious ARPs from AF_INET/SOCK_PACKET to AF_PACKET/SOCK_RAW
(This used to be ctdb commit 2c4c20d7803f4449f8d463314c40d4734ec80e2f)
2009-05-21 14:10:45 +10:00
Michael Adam
839dec1b12 move common code of system_linux.c and system_aix.c into new system_common.c
Michael

(This used to be ctdb commit 124874847e5e03ce2a44bddfe778f01dfb0a7a03)
2009-02-28 03:08:31 +01:00
Stefan Metzmacher
bf86562144 ctdb_sys_have_ip: don't overwrite input data (setting port to 0)
metze

Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit de71ce2195bb4f6a96b12437a2d4d1424fd1c59c)
2009-01-19 22:49:12 +01:00
Michael Adam
3dea35263c Fix verification of IP allocation with ipv6 addresses on Linux.
Set sin_port or sin6_port to 0, depending on sa_family.

Michael

Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit e0c70110e241b065c42c1c07f32c3657bac5d98b)
2009-01-19 22:49:11 +01:00
Ronnie Sahlberg
8e17e75eac fix a bug in the tcp socketkiller for ipv6
(This used to be ctdb commit 83735951352a243da185031e4853e7e40c43a0fb)
2008-08-20 09:23:31 +10:00
Ronnie Sahlberg
37234887d9 fix the ipv6 checksum calculation for pseudoheader so that it actually works
add support to send ipv6 "gratious arp" aka neighbor solicitation packets from ctdb

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>

(This used to be ctdb commit 0a38ea11af9237501f2951fee698a59b46f8750d)
2008-08-19 18:24:08 +10:00
Ronnie Sahlberg
ef997d344f initial ipv6 patch
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>

(This used to be ctdb commit 1f131f21386f428bbbbb29098d56c2f64596583b)
2008-08-19 14:58:29 +10:00
Ronnie Sahlberg
7d39ac131b convert handling of gratious arps and their controls and helpers to
use the ctdb_sock_addr structure so tehy work for both ipv4 and ipv6

(This used to be ctdb commit 86d6f53512d358ff68b58dac737ffa7576c3cce6)
2008-06-04 15:13:00 +10:00
Ronnie Sahlberg
909ff219e0 Start implementing support for ipv6.
This enhances the framework for sending tcp tickles to be able to send ipv6 tickles as well.

Since we can not use one single RAW socket to send both handcrafted ipv4 and ipv6 packets, instead of always opening TWO sockets, one ipv4 and one ipv6 we get rid of the helper ctdb_sys_open_sending_socket() and just open (and close)  a raw socket of the appropriate type inside ctdb_sys_send_tcp().
We know which type of socket v4/v6 to use based on the sin_family of the destination address.

Since ctdb_sys_send_tcp() opens its own socket  we no longer nede to pass a socket
descriptor as a parameter.  Get rid of this redundant parameter and fixup all callers.

(This used to be ctdb commit 406a2a1e364cf71eb15e5aeec3b87c62f825da92)
2008-05-14 15:47:47 +10:00
Ronnie Sahlberg
7d04ca2fc4 Add a missing include
(This used to be ctdb commit 6131f4b4fc7b65f83f3d57927b23393c84bd2a2b)
2008-05-14 15:37:20 +10:00
Ronnie Sahlberg
7178dfb656 add a checksum routine for tcp over ipv6
(This used to be ctdb commit b712762a1b8a3028625085e32136df4458b292c0)
2008-05-14 12:25:55 +10:00
Andrew Tridgell
f6e53f433b merge from ronnie
(This used to be ctdb commit e7b57d38cf7255be823a223cf15b7526285b4f1c)
2008-02-04 20:07:15 +11:00
Andrew Tridgell
9d6ac0cf55 added debug constants to allow for better mapping to syslog levels
(This used to be ctdb commit 7ba8f1dde318eab03f4257e5a89fd23e7281e502)
2008-02-04 17:44:24 +11:00
Ronnie Sahlberg
ab1c8c074e merge from tridge
(This used to be ctdb commit eda3caa77be352967a41ff9bddda5296c94797a9)
2007-09-13 14:28:18 +10:00
Andrew Tridgell
3c0f61cb92 we don't need the is_loopback logic in ctdb any more
(This used to be ctdb commit 4ecf29ade0099c7180932288191de9840c8d90a9)
2007-09-13 10:45:06 +10:00
Ronnie Sahlberg
9c1b2f4856 merged patch from tridge
(This used to be ctdb commit 90ab044093f67b656e21861ce12d6fee5794d21f)
2007-09-10 16:23:06 +10:00
Andrew Tridgell
f3ae1cdb02 - use struct sockaddr_in more consistently instead of string addresses
- allow for public_address lines with a defaulting interface

(This used to be ctdb commit 29cb760f76e639a0f2ce1d553645a9dc26ee09e5)
2007-09-10 14:27:29 +10:00
Ronnie Sahlberg
4ac749bfa4 change the signature to ctdb_sys_have_ip() to also return:
a bool that specifies whether the ip was held by a loopback adaptor or 
not
 the name of the interface where the ip was held

when we release an ip address from an interface, move the ip address 
over to the loopback interface

when we release an ip address  after we have move it onto loopback, 
use 60.nfs to kill off the server side (the local part) of the tcp 
connection   so that the tcp connections dont survive a 
failover/failback

61.nfstickle,   since we kill hte tcp connections when we release an ip 
address   we no longer need to restart the nfs service in 61.nfstickle

update ctdb_takeover to use the new signature for ctdb_sys_have_ip

when we add a tcp connection to kill in ctdb_killtcp_add_connection()
check if either the srouce or destination address match a known public 
address

(This used to be ctdb commit f9fd2a4719c50f6b8e01d0a1b3a74b76b52ecaf3)
2007-09-10 07:20:44 +10:00
Andrew Tridgell
df9ec77b6b merge from volker
(This used to be ctdb commit a5587b3c065f7115ad5e55429c2c9d9923d3b4dc)
2007-08-22 17:18:55 +10:00
Ronnie Sahlberg
6fc0653b97 zero out the sa struct to supress a valgrind error
(This used to be ctdb commit b17ff60ad4c5fac76d3f77dacb10c30ae564bf09)
2007-08-15 12:34:41 +10:00
Ronnie Sahlberg
217142d1e9 add some support for controlling Linux or AIX in the makefile
this should really be done by configure

(This used to be ctdb commit 5a855599288995659e81f1bdbed157bdb207f94a)
2007-07-14 10:58:51 +10:00