mirror of
https://github.com/samba-team/samba.git
synced 2025-03-08 04:58:40 +03:00
ctdb-daemon: Avoid spurious error sending ARPs for released IP
A public IP address can be released in between (and probably before) attempts to send ARPs. One situation when this can occur is when a cluster is shutting down: node A shuts down first, public IPs from node A are taken over by node B, node B is shutdown. Notice this when it occurs and cancel further attempts to send ARPs. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
f5a2037734
commit
d62fcba7dc
@ -373,8 +373,17 @@ static void ctdb_control_send_arp(struct tevent_context *ev,
|
||||
struct ctdb_takeover_arp);
|
||||
int ret;
|
||||
struct ctdb_tcp_array *tcparray;
|
||||
const char *iface = ctdb_vnn_iface_string(arp->vnn);
|
||||
const char *iface;
|
||||
|
||||
/* IP address might have been released between sends */
|
||||
if (arp->vnn->iface == NULL) {
|
||||
DBG_INFO("Cancelling ARP send for released IP %s\n",
|
||||
ctdb_addr_to_str(&arp->vnn->public_address));
|
||||
talloc_free(arp);
|
||||
return;
|
||||
}
|
||||
|
||||
iface = ctdb_vnn_iface_string(arp->vnn);
|
||||
ret = ctdb_sys_send_arp(&arp->addr, iface);
|
||||
if (ret != 0) {
|
||||
DBG_ERR("Failed to send ARP on interface %s: %s\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user