mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-07-27 09:22:03 +00:00
Remove the ttl option from udpu and rely on the kernel ttl setting.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com> Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
This commit is contained in:
parent
86ada30aa4
commit
c9dee9eaa7
@ -477,6 +477,11 @@ int totem_config_validate (
|
||||
error_reason = "Invalid TTL (should be 0..255)";
|
||||
goto parse_error;
|
||||
}
|
||||
if (totem_config->transport_number != TOTEM_TRANSPORT_UDP &&
|
||||
totem_config->interfaces[i].ttl != 1) {
|
||||
error_reason = "Can only set ttl on multicast transport types";
|
||||
goto parse_error;
|
||||
}
|
||||
|
||||
if (totem_config->interfaces[i].mcast_addr.family == AF_INET6 &&
|
||||
totem_config->node_id == 0) {
|
||||
|
@ -1302,7 +1302,6 @@ static int totemudpu_build_sockets_ip (
|
||||
struct sockaddr_storage sockaddr;
|
||||
int addrlen;
|
||||
int res;
|
||||
int flag;
|
||||
unsigned int recvbuf_size;
|
||||
unsigned int optlen = sizeof (recvbuf_size);
|
||||
|
||||
@ -1325,26 +1324,6 @@ static int totemudpu_build_sockets_ip (
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set packets TTL
|
||||
*/
|
||||
flag = instance->totem_interface->ttl;
|
||||
if (bindnet_address->family == AF_INET6) {
|
||||
res = setsockopt (instance->token_socket, IPPROTO_IPV6,
|
||||
IPV6_UNICAST_HOPS, &flag, sizeof (flag));
|
||||
if (res == -1) {
|
||||
perror ("set udpu v6 TTL");
|
||||
return (-1);
|
||||
}
|
||||
} else {
|
||||
res = setsockopt(instance->token_socket, IPPROTO_IP, IP_TTL,
|
||||
&flag, sizeof(flag));
|
||||
if (res == -1) {
|
||||
perror ("set udpu v4 TTL");
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Bind to unicast socket used for token send/receives
|
||||
* This has the side effect of binding to the correct interface
|
||||
|
@ -132,6 +132,7 @@ ttl
|
||||
This specifies the Time To Live (TTL). If you run your cluster on a routed
|
||||
network then the default of "1" will be too small. This option provides
|
||||
a way to increase this up to 255. The valid range is 0..255.
|
||||
Note that this is only valid on multicast transport types.
|
||||
|
||||
.TP
|
||||
member
|
||||
|
Loading…
Reference in New Issue
Block a user